Oceanic anoxic events have been associated with warm climates in Earth history, and there are concerns that current ocean deoxygenation may eventually lead to anoxia. Here we show results of a multi-millennial global-warming simulation that reveal, after a transitory deoxygenation, a marine oxygen inventory 6% higher than preindustrial despite an average 3 °C ocean warming. An interior-ocean oxygen source unaccounted for in previous studies explains two thirds of the oxygen excess reached after a few thousand years. It results from enhanced denitrification replacing part of today's ocean's aerobic respiration in expanding oxygen-deficient regions: The resulting loss of fixed nitrogen is equivalent to an oceanic oxygen gain and depends on an incomplete compensation of denitrification by nitrogen fixation. Elevated total oxygen in a warmer ocean with larger oxygen-deficient regions poses a new challenge for explaining global oceanic anoxic events and calls for an improved understanding of environmental controls on nitrogen fixation.