Halving nitrogen pollution is crucial for achieving sustainable development goals (SDGs). However, how to reduce nitrogen pollution from multiple sources remains a grand challenge. Here we show that reactive nitrogen (Nr) pollution could be roughly halved by well-managed urbanization in China by 2050, with emissions of NH3, NOx and N2O to air declining by 44%, 30% and 33%, respectively, and Nr to water bodies by 53%. Urbanization shifts population from rural to urban areas and promotes large-scale and crop-livestock coupled farming, which reduces non-point source pollution from rural sewage and agriculture. Although rural-to-urban migration increases point-source nitrogen emissions in metropolitan areas, regional air and water quality can be improved by reducing upstream and regional total Nr losses, with increased opportunities to control of point source emissions vs. diffuse emissions. Approximate US$ 61 billion would be required for additional urban waste treatment, agricultural land consolidation and livestock relocation, as well as upgrading industrial facilities. However, the overall benefits are calculated at US$ 245 billion due to increases in agricultural productivity and improvements in environmental quality. Such a large benefit-to-cost ratio suggests the feasibility and cost-effectiveness of halving Nr pollution through urbanization, and this would make significant contributions to achieving several SDG targets.