Abstract The social–ecological trap is an emerging concept that describes situations in which self‐reinforcing social and ecological feedbacks maintain or push a social–ecological system towards an undesirable state and threaten the sustainability of human societies. Understanding a system's feedback loops and identifying the leading factors of such traps is essential to develop effective management strategies to warn, avoid and escape traps. To better understand the dynamics of social–ecological traps, we developed a quantitative diagnostic framework that combines the social–ecological network approach and composite system state index. We demonstrated the effectiveness of the framework by examining the rural social–ecological evolution in China's Loess Plateau (LP) from 1949 to 2020, an area once faced with severe social–ecological challenges such as soil erosion, land degradation and poverty. Our analysis identified three stages of trap dynamics in LP: locked in the trap (1949–1981), reacting to the trap (1981–2003) and escaping the trap (2003–2020). In the first stage, LP was locked into an undesirable trajectory where reinforcing feedback occurs between rapid population growth, limited livelihood opportunities, excessive reliance on agriculture and severe soil erosion. Our results also found that the LP has made significant progress in escaping this social–ecological trap during the 21st century through ecological restoration practices and socioeconomic development. Similar social–ecological traps are also observed in many other regions of the world, particularly in developing countries. Our analysis recommends three pathways for addressing social–ecological traps in the LP: (1) promoting urbanization and livelihood diversity, (2) implementing site‐specific engineering measures (e.g. terraces and check dams in the LP) and (3) investing in ecological restoration programs. Escaping the trap is not the end of the story, but could be an early stage of another trap. Policymakers and managers should keep assessing and monitoring the policy practices and outcomes to avoid entering new trap situations. Read the free Plain Language Summary for this article on the Journal blog.