Healthy ecosystems are the foundation of sustainable urbanization. While scientists have long understood the ecological benefits of healthy landscapes, there is still limited understanding of how urban landscape patterns affect ecosystem health. To fill this gap, we systematically investigated the spatiotemporal relationships between different urban landscape patterns and ecosystem health in 212 major cities in China from 2000 to 2020 using Geographically and Temporally Weighted Regression. Results show that cities with poor ecosystem health are mainly concentrated in central-eastern China and show a long-term trend of degradation. There is spatial and temporal variability in how landscape patterns drive ecosystem health changes. The size, density, and perimeter of urban patches, along with the degree of interspersion between urban land covers with other land covers, are more important for ecosystem health than other spatial pattern measures, but these patterns also have greater temporal variation. Over the past two decades, the negative impacts of urban area growth have diminished in cities in lower-lying plains areas, but remain a major cause of local ecological degradation. The ecological health of mountain cities is more sensitive to changes in the shape and spatial arrangement of urban patches because of the intertwined distribution of natural ecosystems and urban land that often characterize these cities. This work not only confirms the advantages of spatiotemporal analytical thinking in the study of driving mechanisms of ecosystem health but also provides important guidelines for creating desirable landscape patterns for sustainable urban development.