As economic development and urban expansion accelerate, the degradation of ecosystem functions and the emergence of ecological and environmental challenges in the Yellow River Basin (YRB) underscore the urgent need to integrate ecosystems into social development for a robust ecological security pattern (ESP) assessment. Discussing the issue of ecological security (ES) and establishing its ESP are of vital significance for eco-protection and qualitative management of it. The objective of this research was to construct a comprehensive ESP for the YRB, designed to enhance ecological conservation and promote sustainable progress. This was achieved by leveraging ecosystem services (ESs) like habitat quality (HQ), water supply (WS), carbon sequestration (CS), and soil conservation (SC) from the period spanning 2010 to 2020. The approach utilized the source-corridor-pattern framework along with the InVEST (Integrated Valuation of Ecosystem Services and Trade-offs) and MCR (Minimum Cumulative Resistance) modeling tools to facilitate this research. The results indicated that: (1) There was a trend for ESs to exhibit increasing importance as one moved northward, with a corresponding decrease in the southern regions. The overall situation had been good and showed an increasing trend. (2) The ecosystem sensitivity within the YRB was characterized by lower levels in northern and southern extremities, contrasting with higher levels in the intervening regions. The Tibetan Plateau and Loess Plateau transition zone, as well as southern part of the Loess Plateau, had been primarily characterized by high sensitivity and medium sensitivity, respectively. (3) The ecological source area of the YRB increased from 22.65 % to 26.76 % in the research period. It densely distributed on the Loess Plateau and sparsely distributed in watersheds, with the land types dominated by grassland and forest land. High resistance values were predominantly observed in areas designated as unused land and within urban zones, whereas lower resistance values were primarily located along the water system. (4) There was a notable decrease in the count of ecological corridors, dropping from 34 to 23, with a significant concentration in the Ningxia Plain and across the Inner Mongolia Plateau from 2010 to 2020. A total of 10 ecological corridors, spanning 6300.25 km in length, have remained consistent over time. They connected the whole basin from upstream to downstream, creating a comprehensive network for ES. This research constructed the ESP framework which can provide the basis for the relevant departments to implement targeted protection of ES and ecological management.