The production of ammonia from nitrogen gas is one of the most important industrial processes, owing to the use of ammonia as a raw material for nitrogen fertilizers. Currently, the main method of ammonia production is the Haber–Bosch process, which operates under very high temperatures and pressures and is therefore very energy-intensive1. The transition-metal-catalysed reduction of nitrogen gas2,3,4,5,6 is an alternative method for the formation of ammonia. In these reaction systems, metallocenes or potassium graphite are typically used as the reducing reagent, and conjugate acids of pyridines or related compounds are used as a proton source. To develop a next-generation nitrogen-fixation system, these reagents should be low cost, readily available and environmentally friendly. Here we show that the combination of samarium(ii) diiodide (SmI 2 ) with alcohols or water enables the fixation of nitrogen to be catalysed by molybdenum complexes under ambient conditions. Up to 4,350 equivalents of ammonia can be produced (based on the molybdenum catalyst), with a turnover frequency of around 117 per minute. The amount of ammonia produced and its rate of formation are one and two orders of magnitude larger, respectively, than those achieved in artificial reaction systems reported so far, and the formation rate approaches that observed with nitrogenase enzymes. The high reactivity is achieved by a proton-coupled electron-transfer process that is enabled by weakening of the O–H bonds of alcohols and water coordinated to SmI 2 . Although the current reaction is not suitable for use on an industrial scale, this work demonstrates an opportunity for further research into catalytic nitrogen fixation.