We present results of the XMM-Newton observation of the bright X-ray binary Cyg X-2. In our analysis we focus on the absorption and scattering of the X-ray emission by interstellar dust distributed along the line of sight. The scattering halo around Cyg X-2, observed with the CCD detector EPIC-pn, is well detected up to ∼7 arcmin and contributes ∼5-7% to the total source emission at 1 keV, depending on the dust size distribution model considered. For the first time spatially resolved spectroscopy of a scattering halo is performed. In the halo spectrum we clearly detect the signature of the interstellar dust elements: O, Mg, and Si. In the 0.4−2 keV band, the spectral modeling of the halo shows a major contribution of silicates (olivine and pyroxene). The spatial analysis of the halo surface brightness profile shows that the dust is smoothly distributed toward Cyg X-2 at least for ∼60% of the path to the source. However, given the substantial pile-up, we could not investigate fainter or narrower components of the halo. Within this observation limit, the data do not show preference for a specific dust size distribution. In this analysis we used the Mie theory to compute the differential scattering cross section. The RGS data were used to investigate the ISM absorption. The absorption spectrum shows complexity around the oxygen edge at ∼0.54 keV, which cannot be explained in a unique way: it involves either absorption by molecular oxygen or ionized atomic oxygen, as proposed in other studies of Cyg X-2. Combining the RGS results with the additional information on dust grains provided by the EPIC-pn spectrum of the scattered radiation we estimate a column density for dust absorption by oxygen, provided that it is locked in silicate grains.