Surely not a gas giant... Mercury is a rock of 0.05 $\rm m_{\oplus}$, such a mass could never grow into a gas giant (For detail see Piso & Youdin (2014), fig. 6, where you can see that below a planet mass of 5 $\rm m_{\oplus}$ the growth time of a significant atmosphere for a planet exceeds the lifetime of protoplanetary discs, i.e. is not possible).
I suppose it wouldn't be impossible however, for a Mercury mass-object to grow into something Titan-like in the outer solar system. The formation of Titans atmosphere is poorly understood, but should have been accreted from Saturns sub-nebula. Titan is however far from being an ice-giant.
This young Mercury would then however, have to be extremely lucky to find its way into the inner solar system and end up on a circular orbit. It would have to be ejected from any young Giants orbit, evade Jupiter and be slingshot by the inner planets just in the right way.
This is a scenario that is very hard to buy.
Furthermore given the similarity of the terrestrial planets with Enstatite chondrites ('dry' meteorites) and other classes of dry asteroids, it is much more likely that the four inner planets were formed more or less where they are now.
Update concerning the comment:
Early models, which are quoted by wikipedia (Podolak et al. (1995)) assume a strict three-layer structure without any intermixing between the rock, ice and hydrogen/helium components. The model inversion resulting from the gravitational moments as measured by the Voyager2 probe then gives 0.5 $\rm m_{\oplus}$. One then could get the idea that an 'evaporated ice giant' would look like a Mercury.
However, this model inversion is far from unique, as one can assume a variety of model structures and mixing scenarios for the interior that fit the gravitational moments. This abandoning of the three-layer model has the advantage that some of the models are able to reproduce the heat fluxes, which were thought to be anomalous earlier (Vazan et al. (2020)). Those models work with ice-to-rock ratios that are quite similar to the outer solar system objects (i.e. 2:1 down to 1:2) and hence produce much larger silicate fractions. The '0.5 Earth-mass' problem then disappears.
But to stress how badly constrained the rock content in the ice giants is, given the data, we can have a look in the review of Helled et al. (2020). There, in section 3.2 it is stressed that with the current data one can even fit the ice giants with a 82% ice : rock ratio, and the rest being H/He.
But even if one would ignore that the 0.5 $\rm m_{\oplus}$ scenario is very unlikely. Even if one would ignore the difficulties to get this planet to its current semi-major axis distance. Even if one ignores Venus (0.7 $\rm m_{\oplus}$ with a significant, non-escaped atmosphere). Even then, a $>=14 m_{\oplus}$ planet at a period of 100 days around a G2 type star is nowhere near to receieve enough irradiation to evaporate its entire H/He + heavy element content except for a hand-selected SiO2+Fe+MgO core (see the exoplanet archive for data on this).
So what you have heard on the news, the fact that Mercury has a very large core is explained in more likely scenario that it initially had a crust, such as seen on Earth and Mars, which has been removed by giant impacts.
As for the migration part: That's just impossible. I don't think there is a possibility for a proto-giant Mercury to migrate from the outer solar system to the inner one, without being ejected by Jupiter or without ejecting the inner planets. The inner planets would either be ejected during migration, or in the long, evolutionary phase after planet formation, due to the high mass of proto-giant Mercury.