Ecological carbon sinks, pivotal in mitigating carbon emissions, are indispensable for climate change mitigation. Counties, as the fundamental units of ecological space management, directly impact the achievement of regional dual carbon targets through their levels of carbon sink. However, existing research has overlooked the intricate relationship between terrain features and ecological spaces, leading to a lack of specific guidance on enhancing the carbon sink for counties with diverse landform characteristics. This study focused on Jingbian County (Loess Plateau), Fuping County (Guanzhong Plain), and Chenggu County (Qinba Mountains), each characterized by distinct landform characteristics. This study proposes a comprehensive identification model for ecological space within the context of dual carbon targets. Utilizing this model as a basis, the land use structure, carbon sink potential, and ecological spatial patterns of different counties were systematically analyzed. The results indicated substantial disparities in land use structure, carbon sink capabilities, and ecological space distributions among counties with different landform types. Specifically, Jingbian County was predominantly covered by grassland, exhibiting a moderate overall carbon sink capacity, with baseline ecological spaces playing a significant role. Conversely, Fuping County, dominated by cultivated land and construction land, exhibited the lowest carbon sink capacity, with non-ecological spaces accounting for a staggering 85.93%. Chenggu County, on the other hand, was characterized by the dominance of forestland, with nearly all its carbon sink originating from forestland, and core ecological spaces occupying a leading position. Tailored optimization strategies are recommended based on varying terrain features: Jingbian County should prioritize ecosystem restoration and conservation, while Fuping County should concentrate on optimizing land use structure and promoting urban greening. Reinforcing the carbon sink capacity of existing ecosystems is crucial for Chenggu County. This study broadens the perspective on ecological space optimization and provides scientific guidance and pragmatic insights tailored to regional disparities, which are instrumental in assisting various regions to achieve their dual carbon targets.