Experiments to investigate the partitioning of oxygen between liquid iron and (Mg,Fe)O magnesiowüstite were conducted at 30–70 GPa and 2800–3500 K using a laser-heated diamond anvil cell. A thin foil was prepared from the reacted regions in the recovered samples using a focused ion beam. The compositions of coexisting quenched iron and magnesiowüstite were measured using a transmission electron microscope equipped with energy dispersive X-ray spectroscopy and electron energy-loss spectroscopy. In order to understand and model the results, additional experiments were performed to determine the activity of oxygen, or rather FeO, in liquid Fe metal. Multianvil experiments to measure the oxygen contents of coexisting immiscible metallic and ionic liquids in the Fe-FeO system were performed up to 25 GPa. The results were used to extract excess mixing properties for Fe-FeO liquids at high pressure and temperature. These properties were used to derive a model that describes oxygen partitioning in the Fe-Mg-O system that is independent of the actual experimental partitioning data. The model indicates that the oxygen content of liquid Fe becomes a strong nonlinear function of the FeO content of magnesiowüstite at pressures greater than 25 GPa. This prediction is in excellent agreement with the experimental partitioning data, which is faithfully reproduced in most instances. The new results confirm that the Earth's core is undersaturated in oxygen with respect to the FeO content of the bulk mantle, which will result either in FeO being depleted from the very base of the mantle or lead to the development of an FeO-enriched outer layer of the core. These possibilities are not mutually exclusive.