The terrestrial planets are depleted in volatile elements with respect to chondritic meteorites, their possible building blocks. However, the timing, extent and origin of volatile depletion is debated. Zinc is a moderately volatile element (MVE), whose stable isotopic composition can distinguish when and where this depletion took place. Here, we report data for 40 ultramafic rocks comprising pristine upper mantle peridotites from the Balmuccia orogenic lherzolite massif and Archean komatiites that together define the Zn isotope composition of the Earth's primitive mantle. Peridotites and komatiites are shown to have indistinguishable Zn isotopic compositions of δ66Zn = + 0.16 ± 0.06‰ (2SD), (with δ66Zn the per mille deviation of 66Zn/64Zn from the JMC-Lyon standard), implying a constant Zn isotope composition for the silicate Earth since 3.5 Ga. After accounting for Zn sequestration during core formation, the Earth falls on the volatile-depleted end of a carbonaceous chondrite array in δ66Zn-Zn/Mg space, implying Earth avoided modification of its MVE budgets during late accretion (e.g. during a giant impact), in contrast to the Moon. The Moon deviates from the chondritic array in a manner consistent with evaporative loss of Zn, where its δ66Zn co-varies with Mn/Na, implying post-nebular volatile loss is more pronounced on smaller bodies. Should the giant impact deliver the Earth's volatile complement of Pb and Ag, it cannot account for the budget of lithophile MVEs (e.g. Zn, Rb, Mn), whose abundances reflect those of Earth's nebular building blocks. The Earth initially accreted from material that experienced chemical- and mass-dependent isotopic fractionation akin to carbonaceous chondrites, though volatile depletion was more pronounced on Earth.