Once considered dry compared with Earth, laboratory analyses of igneous components of lunar samples have suggested that the Moon’s interior is not entirely anhydrous. Water and hydroxyl have also been detected from orbit on the lunar surface, but these have been attributed to nonindigenous sources, such as interactions with the solar wind. Magmatic lunar volatiles—evidence for water indigenous to the lunar interior—have not previously been detected remotely. Here we analyse spectroscopic data from the Moon Mineralogy Mapper (M3) and report that the central peak of Bullialdus Crater is significantly enhanced in hydroxyl relative to its surroundings. We suggest that the strong and localized hydroxyl absorption features are inconsistent with a surficial origin. Instead, they are consistent with hydroxyl bound to magmatic minerals that were excavated from depth by the impact that formed Bullialdus Crater. Furthermore, estimates of thorium concentration in the central peak using data from the Lunar Prospector orbiter indicate an enhancement in incompatible elements, in contrast to the compositions of water-bearing lunar samples. We suggest that the hydroxyl-bearing material was excavated from a magmatic source that is distinct from that of samples analysed thus far.