Compared with the energy-intensive Haber-Bosch process, renewable energy-driven electrocatalytic nitrate reduction reaction (NO3−RR) provides a low-carbon route for ammonia synthesis under mild conditions. Using nitrate from wastewater as the nitrogen source and water as the hydrogen source, this route has the potential to produce ammonia sustainably while mitigating water pollution.