The removal of carbon dioxide from the atmosphere by the marine biological pump is a key regulator of Earth’s climate; however, the ocean also serves as a large source of nitrous oxide, a potent greenhouse gas and ozone-depleting substance. Although biological carbon sequestration and nitrous oxide production have been individually studied in the ocean, their combined impacts on net greenhouse forcing remain uncertain. Here we show that the magnitude of nitrous oxide production in the epipelagic zone of the subtropical ocean covaries with remineralization processes and thus acts antagonistically to weaken the radiative benefit of carbon removal by the marine biological pump. Carbon and nitrogen isotope tracer incubation experiments and nitrogen isotope natural abundance data indicate enhanced biological activity promotes nitrogen recycling, leading to substantial nitrous oxide production via both oxidative and reductive pathways. These shallow-water nitrous oxide sources account for nearly half of the air–sea flux and counteract 6–27% (median 9%) of the greenhouse warming mitigation achieved by carbon export via the biological pump.