The delineation of ecological red lines (ERLs) is of great significance to ensure ecological security and improve the quality of the ecological environment. However, most of the current ERL delineation only focuses on the natural environment, lacks consideration of the spatial pattern of ecological landscape, and there is no scientific standard for ERL delineation. From the perspective of ecological security patterns (ESPs), this study proposed an ERL delineation method based on gray relational analysis (GRA) and the minimum cumulative resistance (MCR) model. Then taking Shawan District as an example, the effectiveness of the method was verified by comparing the delineated ERL in this study with that of traditional evaluation methods. A total of 321.43 km2 of ERL was delineated, accounting for 67.75% of the total area of Shawan District, including 69.70 km2 of Grade I ERL zones, 251.73 km2 of Grade II ERL zones. The results show that ERLs based on GRA and MCR exhibit better connectivity and contain more ecological land. The method has guiding significance and reference value for regional ERL delineation, which is conducive to the decision-making of environmental protection departments. Conservation measures for different landscapes are more targeted to constrain people’s productive activities precisely.