Nitrogen holds a crucial place in sustaining the food-energy-water (FEW) nexus, which underpins human society. Its importance spans food production, energy generation, and water quality preservation. Here we show that comprehensive nitrogen management strategies offer the dual benefits of satisfying China's food requirements and boosting nitrogen energy production from straw by 1 million tonnes (26%) compared to 2020. Simultaneously, these strategies could lead to a reduction of 8 million tonnes (-31%) in nitrogen fertilizer usage, a decrease of 3.8 million tonnes (-46%) in nitrogen-induced water pollution, and a halving of water consumption in agriculture, all relative to 2020 levels. These transformative changes within the FEW nexus could result in national societal gains of around US$140 billion, against a net investment of just US$8 billion. This highlights the cost-effectiveness of such strategies and their potential to support China's sustainable development goals, especially in hunger relief, clean energy, and aquatic ecosystem protection.