Knowing the amount and timing of water incorporation into the Moon has fundamental implications for our understanding of how the Earth–Moon system formed. Water has been detected in lunar samples but its abundance, distribution and origin are debated. To address these issues, we report water concentrations and hydrogen isotope ratios obtained by secondary ion mass spectrometry (SIMS) of plagioclase from ferroan anorthosites (FANs), the only available lithology thought to have crystallized directly from the lunar magma ocean (LMO). The measured water contents are consistent with previous results by Fourier transform infrared spectroscopy (FTIR). Combined with literature data, δD values of lunar igneous materials least-degassed at the time of their crystallization range from −280 to +310‰, the latter value being that of FAN 60015 corrected for cosmic ray exposure. We interpret these results as hydrogen isotopes being fractionated during degassing of molecular hydrogen (H2) in the LMO, starting with the magmatic δD value of primordial water at the beginning of LMO being about −280‰, evolving to about +310‰ at the time of anorthite crystallization, i.e. during the formation of the primary lunar crust. The degassing of hydrogen in the LMO is consistent with those of other volatile elements. The wide range of δD values observed in lunar igneous rocks could be due to either various degrees of mixing of the different mantle end members, or from a range of mantle sources that were degassed to different degrees during magma evolution. Degassing of the LMO is a viable mechanism that resulted in a heterogeneous lunar interior for hydrogen isotopes.