Strong soil erosion and increasing human activities have made Loess Plateau areas ecologically fragile regions. Constructing the ecological security pattern (ESP) is imperative to maintain their ecosystem functions and sustainable development. However, it is still challenging to establish the ESP in such an unstable and scattered ecological environment. In this study, we take Shanxi Province, which suffers severe ecological problems in Loess Plateau areas, as an example to construct the ESP in a pattern of “source-resistance-corridor”. The proposed methods include the following steps: (1) potential ecological sources are selected with important ecosystem functions based on contributions of soil and water conservation, habitat quality, and carbon storage; (2) ecological sources are determined by considering core areas at the landscape scale based on morphological spatial pattern analysis (MSPA) along with stability based on dynamic assessment on previous sources; (3) the comprehensive resistance surface is constructed by multiple resistance factors and remotely sensed nighttime light data; (4) ecological corridors are simulated and extracted based on circuit theory. As a result, the proposed ESP in our study area mainly includes 13,592 km2 of ecological sources, 8519.64 km of ecological corridors, and 277 ecological nodes. Meanwhile, an ecological framework of “two axes, three belts, and three zones” was proposed based on the optimization and reorganization of ecological components within the ESP. Our research lays a methodological and practical foundation for regional ESP construction and sustainable development in Loess Plateau areas.