Hydrogen ions in the solar wind likely combine with oxygen on any asteroid or moon on or near the surface to make water.
Remote sensing discoveries of hydroxyl and water on the lunar surface have reshaped our view of the distribution of water and related compounds on airless bodies such as the Moon. The origin of this surface water is unclear, but it has been suggested that hydroxyl in the lunar regolith can result from the implantation of hydrogen ions by the solar wind. Here we present Fourier transform infrared spectroscopy and secondary ion mass spectrometry analyses of Apollo samples that reveal the presence of significant amounts of hydroxyl in glasses formed in the lunar regolith by micrometeorite impacts. Hydrogen isotope compositions of these glasses suggest that some of the observed hydroxyl is derived from solar wind sources. Our findings imply that ice in polar cold traps could contain hydrogen atoms ultimately derived from the solar wind, as predicted by early theoretical models of water stability on the lunar surface. We suggest that a similar mechanism may contribute to hydroxyl on the surfaces of other airless terrestrial bodies where the solar wind directly interacts with the surface, such as Mercury and the asteroid 4-Vesta.