High‐quality urbanization and a healthy ecosystem are both the material basis for sustainable social development. However, the tie between terrestrial ecosystem health (TEH) and urbanization is still unclear. Therefore, we assessed the spatial and temporal dynamics of urbanization and TEH at 368 cities in China from 2000 to 2020, then explored their spatial interaction and driving mechanisms by spatial autocorrelation analysis and structural equation modeling. The results showed: (1) China's comprehensive urbanization index (UI) improved from 0.08 in 2000 to 0.10 in 2020, contributing by some national urban agglomerations such as Beijing‐Tianjin‐Hebei, Yangtze River Delta, and Pearl River Delta. (2) China's terrestrial ecosystem health index (EHI) also increased from 0.67 to 0.68. Ecosystem vigor improved significantly, while ecosystem organization and resilience both decreased. (3) EHI and UI appeared to be locally spatially dependent, and path dependence was presented at municipal scales. (4) At the national scale, urbanization positively relates to EHI, which was enhanced by social, economic, and topography factors. The dominant drivers on EHI varied among regions, and urbanization improved EHI in all regions except for the southwest. Our study demonstrated that urbanization would promote TEH by implementing high‐quality development and ecological management simultaneously, providing theoretical support for urban sustainable development and ecological management.