The abundance of siderophile elements in the mantle preserves the signature of core formation. On the basis of partitioning experiments at high pressure (35 to 74 gigapascals) and high temperature (3100 to 4400 kelvin), we demonstrate that depletions of slightly siderophile elements (vanadium and chromium), as well as moderately siderophile elements (nickel and cobalt), can be produced by core formation under more oxidizing conditions than previously proposed. Enhanced solubility of oxygen in the metal perturbs the metal-silicate partitioning of vanadium and chromium, precluding extrapolation of previous results. We propose that Earth accreted from materials as oxidized as ordinary or carbonaceous chondrites. Transfer of oxygen from the mantle to the core provides a mechanism to reduce the initial magma ocean redox state to that of the present-day mantle, reconciling the observed mantle vanadium and chromium concentrations with geophysical constraints on light elements in the core.