Climate change and rapid urbanization bring natural and anthropogenetic disturbance to the urban ecosystem, damaging the sustainability and resilience of cities. Evaluation of urban ecological resilience and an investigation of its impact mechanisms are of great importance to sustainable urban management. Therefore, taking the Beijing-Tianjin-Hebei Urban Agglomeration (BTHUA) region in China as a study area, this study builds an evaluation index to assess urban ecological resilience and its spatial patterns with the resilience surrogate of net primary production during 2000–2020. The evaluation index is constructed from two dimensions, including the sensitivity and adaptability of urban ecosystems, to capture the two key mechanisms of resilience, namely resistance and recovery. Resilience-influencing factors including biophysical and socio-economic variables are analyzed with the multiple linear regression model. The results show that during 2000–2020, the spatial pattern of urban ecological resilience in the BTHUA is characterized by high resilience in the northwest and relatively low resilience in the southeast. High resilience areas account for 40% of the whole region, mainly contributed by Zhangjiakou and Chengde city in Hebei Province, which is consistent with the function orientation of the BTH region in its coordinated development. Along with urbanization in this region, ecological resilience decreases with increased population and increases with GDP growth; this indicates that, although population expansion uses resources, causes pollution and reduces vegetation coverage, with economic growth and technological progress, the negative ecological impact could be mitigated, and the coordinated development of social economy and ecological environment could eventually be reached. Our findings are consistent with mainstream theories examining the ecological impact of socio-economic development such as the Environmental Kuznets Curve, Porter Hypothesis, and Ecological Modernization theories, and provide significant references for future urbanization, carbon neutrality, resilience building, and urban ecological management in China.