Silicon and oxygen are potential light elements in the Earth's core and may be involved in metal-silicate reactions at the present day core-mantle boundary. We have performed multianvil experiments at 25 GPa and 2770–3080 K to understand the simultaneous partitioning of these elements between liquid iron–rich metal and silicate melt. The presence of O in liquid Fe at high temperatures influences the partitioning of Si, causing more Si to partition into the metal than would be expected based on lower temperature measurements. Although Si and O are mutually exclusive in Fe metal at <3000 K, the level at which both element concentrations are similar in the liquid metal rises above 1 wt % at >3000 K. We have developed a thermodynamic model based on these experiments that accounts for the interaction between O and Si in the liquid metal. Comparison between this model and the previous results of diamond-anvil cell experiments up to 71 GPa indicates very little pressure dependence but a strong temperature dependence for O and Si partitioning. Our model predicts that subequal concentrations of Si and O, sufficient to explain the outer core density deficit, would have partitioned into core-forming metal if equilibration occurred between the metal and a magma ocean with a bulk silicate Earth composition at an average depth of ~1200 km (~50 GPa and ~3300 K). An O- and Si-enriched buoyant layer may have developed at the top of the outer core as a result of subsequent equilibration with the overlying mantle.