Relative to the atmosphere, much of the aerobic ocean is supersaturated with methane; however, the source of this important greenhouse gas remains enigmatic. Catabolism of methylphosphonic acid by phosphorus-starved marine microbes, with concomitant release of methane, has been suggested to explain this phenomenon, yet methylphosphonate is not a known natural product, nor has it been detected in natural systems. Further, its synthesis from known natural products would require unknown biochemistry. Here we show that the marine archaeon Nitrosopumilus maritimus encodes a pathway for methylphosphonate biosynthesis and that it produces cell-associated methylphosphonate esters. The abundance of a key gene in this pathway in metagenomic data sets suggests that methylphosphonate biosynthesis is relatively common in marine microbes, providing a plausible explanation for the methane paradox.