Implementing Territorial Ecological Restoration is a crucial approach to achieving ecological stability and regional sustainable development, and it also serves as an important measure for promoting the coordinated development of socioeconomic and ecological environments in the Yellow River Basin. However, effective identification of key areas for Territorial Ecological Restoration remains challenging in planning ecological restoration projects. This study focuses on ecological security and restoration potential, taking Linxia Prefecture in the ecologically fragile area of the upper Yellow River as an example. By evaluating six types of ecosystem services in this area, utilizing morphological spatial pattern analysis models and circuit theory, we identified the structural elements of ecological security patterns and assessed the potential for ecological restoration, identifying key areas for regional ecological restoration.The findings indicated that (1) 13 ecological patches were identified in total, predominantly distributed in the southwest and central regions of Linxia Prefecture. 25 ecological corridors were identified, demonstrating a high level of spatial coherence in terms of significance and connectivity, establishing a closely integrated ecological security network primarily in the southwest of Linxia Prefecture. (2) Thirteen ecological pinch points and seventeen ecological barrier points have been identified, concentrated in the central and southwestern regions of Linxia Prefecture. (3) Based on the characteristics and urgency of key areas for Territorial Ecological Restoration, they are classified and graded as “point-line-surface” and “primary-very important-important.” The primary restoration areas of the point type are mainly located in the central part of Linxia Prefecture, while the primary restoration areas of the line and plane types are mainly in the southwestern part of Linxia Prefecture. This paper emphasizing a holistic approach that prioritizes ecosystem integrity and social support to guide targeted restoration strategies across various ecological features, ultimately aiming for sustainable regional development and maximizing restoration benefits in ecologically fragile areas.