Anaerobic ammonium oxidation (anammox)-the biological process that activates ammonium with nitrite-is responsible for a significant fraction of N2 production in marine environments. Despite decades of biochemical research, however, no synthetic models capable of anammox have been identified. Here we report that a copper sulfide mineral replicates the entire biological anammox pathway catalysed by three metalloenzymes. We identified a copper-nitrosonium {CuNO}10 complex, formed by nitrite reduction, as the oxidant for ammonium oxidation that leads to heterolytic N-N bond formation from nitrite and ammonium. Similar to the biological process, N2 production was mediated by the highly reactive intermediate hydrazine, one of the most potent reductants in nature. We also found another pathway involving N-N bond heterocoupling for the formation of hybrid N2O, a potent greenhouse gas with a unique isotope composition. Our study represents a rare example of non-enzymatic anammox reaction that interconnects six redox states in the abiotic nitrogen cycle.