Volatile elements have a fundamental role in the evolution of planets. But how budgets of volatiles were set in planets, and the nature and extent of volatile-depletion of planetary bodies during the earliest stages of Solar System formation remain poorly understood. The Moon is considered to be volatile-depleted and so it has been predicted that volatile loss should have fractionated stable isotopes of moderately volatile elements. One such element, zinc, exhibits strong isotopic fractionation during volatilization in planetary rocks, but is hardly fractionated during terrestrial igneous processes, making it a powerful tracer of the volatile histories of planets. Here we present high-precision zinc isotopic and abundance data which show that lunar magmatic rocks are enriched in the heavy isotopes of zinc and have lower zinc concentrations than terrestrial or Martian igneous rocks. Conversely, Earth and Mars have broadly chondritic zinc isotopic compositions. We show that these variations represent large-scale evaporation of zinc, most probably in the aftermath of the Moon-forming event, rather than small-scale evaporation processes during volcanism. Our results therefore represent evidence for volatile depletion of the Moon through evaporation, and are consistent with a giant impact origin for the Earth and Moon.