Due to stellar rotation, the observed radial velocity of a star varies during the transit of a planet across its surface, a phenomenon known as the Rossiter-McLaughlin (RM) effect. The amplitude of the RM effect is related to the radius of the planet which, because of differential absorption in the planetary atmosphere, depends on wavelength. Therefore, the wavelength-dependent RM effect can be used to probe the planetary atmosphere. We measure for the first time the RM effect of the Earth transiting the Sun using a lunar eclipse observed with the ESO HARPS spectrograph. We analyze the observed RM effect at different wavelengths to obtain the transmission spectrum of the Earths atmosphere after the correction of the solar limb-darkening and the convective blueshift. The ozone Chappuis band absorption as well as the Rayleigh scattering features are clearly detectable with this technique. Our observation demonstrates that the RM effect can be an effective technique for exoplanet atmosphere characterization. Its particular asset is that photometric reference stars are not required, circumventing the principal challenge for transmission spectroscopy studies of exoplanet atmospheres using large ground-based telescopes.