Yunnan Province is part of the Yun-Gun Plateau in southwest China with rich ecological resources and special geographic features, resulting in considerable ecological security. This study used the pressure-state-response (PSR) model to vertically evaluate Yunnan’s ecological security and horizontally compare ecological security between Yunnan and other four neighbouring provinces (Sichuan, Chongqing, Guizhou, Guangxi) during 2000–2020. We also elaborated on the ecological security of Yunnan’s unique geographical features, such as plateau lakes, karst mountains, and tropical rainforest areas. The results show that the ecological security in Yunnan Province improved overall, with a slow increase (2000–2006), a fluctuating decline (2007–2012), and a sharp jump (2013–2020). The ecological security level climbed from ‘critical safe’ to ‘comparative safety’. The pressure layer was the largest contributor to the increase from 2000 to 2011, whereas the response layer was the main determinant of the upward trend since 2012. Despite its better performance early in the study period, Yunnan’s ecological security index (ESI) rose at a lower rate since 2011 than ESIs of neighbouring provinces in the southwest. Within Yunnan, unique geographical regions have roughly consistent ESIs as the entire province. The exception was the tropical rainforest area, with lower ESI than in other parts of Yunnan. We then discussed implications for enhancing ecological security in Yunnan, including real-time monitoring platforms, green innovations and different environmental regulations. The results provide insight beneficial to the improvement of ecological-security evaluation and the ecological sustainable development of Yunnan.