Laboratory measurements of samples returned by China's Chang'e-5 mission demonstrate that the Moon generated a long-lived magnetic field.