A key aspect of mitigating global climate warming is enhancing the carbon storage capacity of terrestrial ecosystems. China’s Grain for Green Program (GFGP) is the largest ecological restoration project in the world, which is closely associated with land use change. A systematic assessment of the GFGP’s impact on regional carbon storage is of great significance for promoting regional development and maintaining ecosystem stability. Therefore, this study selects a typical dry-hot valley area—Yanjin County—as the study area, which serves as an ecological protection barrier in Southwest China. We employed the InVEST model and Geo-detector model based on land use data from three periods (2000, 2014, and 2019), combined with static overlay analysis methods, in order to evaluate the impact of the implementation of GFGP on the spatial and temporal distribution of carbon storage. We also explored the driving factors of the spatial differentiation of carbon storage. The results indicate that, since the implementation of the GFGP, a total of 180.03 km2 of cropland has been converted to forestland, increasing the forest cover rate from 81.83% to 83.37%. The project has contributed 5.88 × 105 t to regional carbon storage, effectively offsetting carbon emissions caused by human activities such as urban expansion while also promoting the growth of regional carbon storage. The implementation of the GFGP has led to changes in three types of land use. Among them, converting cropland to forestland (3262 t/km2) is the most effective carbon sequestration method, and converting cropland to grassland (2530 t/km2) has shown great potential in carbon sequestration. Additionally, the study found that elevation (0.038–0.059) is the main factor affecting the spatial differentiation of carbon storage, and the interaction between elevation and other factors can effectively enhance the carbon sequestration capacity of regional ecosystems. Overall, the GFGP not only plays a significant role in combating climate warming but also makes an important contribution to improving the stability and sustainability of regional ecosystems.