Urban resilience is one of the crucial components of sustainable urban development, yet challenges to sustainable urban development are created by the dangers of uncertainty in the context of global urbanization. Based on the perspective of the economic, social, ecological, infrastructural, and institutional components, this research constructs an indicator system to assess urban resilience. Using seven megacities in China as the research area, the evolution of the resilience level of China’s megacities is investigated, and its influencing factors are examined. The findings demonstrate an upward trend from 2010 to 2021 in the resilience of China’s seven megacities. Furthermore, the rising trend in the contribution of urban institutional resilience to overall resilience is most evident during the 2010–2021 period. Urban ecological resilience’s contribution to overall resilience declines most noticeably between 2010 and 2021. The contribution of each megacity subsystem resilience to overall resilience varies in different cities. Industry structure, market capacity, and urban maintenance positively affect the overall resilience of cities. Additionally, this work offers a strong, practical theoretical foundation for sustainable urban development. The research contents and findings of this study can support the decision-making procedures in the development of megacities.