CHROMIUM, vanadium and manganese are present in similar abundances in the Earth's mantle and the Moon, and are substantially depleted relative to their Mg-normalized primordial abundances1-6. Experimental studies7,8 of the partitioning of chromium, vanadium and manganese between molten iron and silicates show that these elements are lithophile at the pressures, temperatures and oxygen fugacities prevailing in the Earth's upper mantle and in the Moon. Here, we show that at much higher pressures, corresponding to those in the Earth's lower mantle, the partitioning behaviour of Cr, V and Mn changes owing to increasing solubility of oxygen in molten iron. Cr and V (and perhaps Mn) are preferentially partitioned into molten iron under these conditions. We therefore attribute the depletions of these elements in the Earth's mantle to their siderophile behaviour during formation of the Earth's core, at pressures that were sufficiently high to cause substantial amounts of oxygen to dissolve in molten metallic iron. Similar depletion patterns of Cr, V and Mn in the Earth's mantle and the Moon strongly suggest that a large proportion of the Moon was derived from the Earth's mantle after the Earth's core had segregated.