Optimizing the spatial pattern of carbon sequestration service is essential for advancing regional low-carbon development, accelerating the achievement of the "dual carbon" goals, and promoting the high-quality development of ecological environment. The carbon sequestration capacity within the mountain-desert-oasis system (MDOS), a unique landscape pattern, exhibits significant gradient characteristics, and its carbon sink potential can be substantially improved through multi-scale spatial optimization. This study employed the Integrated Valuation of Ecosystem Services and Tradeoff (InVEST) model to estimate carbon storage and sequestration (CSS) in the Gansu section of Heihe River Basin, China, a representative MDOS, based on land use/land cover (LULC) data from 1990 to 2020. The Patch-level Land Use Simulation (PLUS) model was coupled to simulate LULC and estimate carrying CSS under natural development (ND), ecological protection (EP), water constraint (WC), and economic development (ED) scenarios for 2035. Furthermore, the study constructed and optimized the CSS pattern on the basis of economic and ecological benefits, exploring the guiding significance of different scenarios for pattern optimization. The results showed that CSS spatial distribution is closely correlated with LULC pattern, and CSS is expected to improve in the future. CSS showed an overall increase across subsystems during 1990-2020, but varied across LULC types. CSS of construction land in all subsystems exhibited an increasing trend, while CSS of unused land showed a decreasing trend, with specific changes of 1.68×103 and 3.43×105 t, respectively. Regional CSS dynamics were mainly driven by conversions among unused land, cultivated land, and grassland. The CSS pattern of MDOS was divided into carbon sink functional region (CSFR), low carbon conservation region (LCCR), low carbon economic region (LCER), and economic development region (EDR). Water resources coordination served as the basis of pattern optimization, while the four dimensions—ecological carbon sink, low-carbon maintenance, agricultural carbon reduction and sink enhancement, and urban carbon emission reduction—framed the optimization framework. ND, EP, WC, and ED scenarios provided guidance as the basic reference, optimal benefit, "dual carbon" baseline, and upper development limit, respectively. Additionally, the detailed CSS sub-partitions of MDOS covered most potential scenarios of such ecosystems, demonstrating the applicability of these sub-partitions. These findings provide valuable references for enhancing CSS and hold important significance for low-carbon territorial spatial planning in the MDOS.