Biological nitrogen fixation (BNF) is a critical natural nitrogen input that sustains terrestrial carbon cycling, yet it remains poorly represented in terrestrial ecosystem models. Here, we refine the nitrogen cycle representation in a terrestrial ecosystem model by incorporating symbiotic and free-living nitrogen fixation along with atmospheric nitrogen deposition effects. Our updated model provides a new assessment of present-day and future global natural ecosystem biological nitrogen fixation rates and their spatial distribution. We estimate present-day (1981 - 2020) free-living nitrogen fixation contributes to 36 Tg N yr⁻¹, ranging from 33 to 38.5 Tg N yr⁻¹ and symbiotic nitrogen fixation is 88 Tg N yr⁻¹ with a range of 80–95 Tg N yr⁻¹, resulting in a total BNF 124 Tg N yr–1 (ranging from 112 to 134 Tg N yr⁻¹). Under the SSP5-8.5 warming scenario, our projections indicate that total BNF could increase to 178 Tg N yr⁻¹ by the end of the 21st century. Our model results highlight that the free-living nitrogen fixation plays a dominant role in low-temperature environments, and plant functional type emerges as the primary factor for both symbiotic and free-living nitrogen fixation pathways, thus precise global vegetation classification is necessary for N2 fixation simulation. Our refined model advances global nitrogen cycle modeling and will improve future quantification of both global carbon and nitrogen cycles.