The control of rocky desertification is the largest ecological restoration project in southwestern China, but its impact on the carbon sequestration capacity of karst ecosystems is not clear. Therefore, in this paper selects typical subtropical karst areas in Guangxi are selected as the research object, the carbon sequestration potential of the terrestrial ecosystems are quantified, including karst inorganic carbon sinks, and the response of the terrestrial ecosystem carbon sink to rocky desertification restorationis discussed. The results show that (1) the karst inorganic carbon sink flux (CCSF) is 42.75 t CO2/km2/yr, with a total CCS of 491.12 × 104 t CO2, accounting for only 2.5 % of the country's land area and contributing 7.6 % of the karst inorganic carbon sink. (2) The flux of the vegetation organic carbon sink is 380.44 t CO2/km2/yr, and the total amount is 4403.55 × 104 t CO2/yr., Overall, the spatial distribution exhibits a pattern of high in the northwest and low in the northeast. (3) With decreasing rocky desertification area, the magnitude of the terrestrial ecosystem carbon sink has exhibited a corresponding increasing trend. In particular, during 2010–2020, the rocky desertification area decreased by about 0.868 × 104 km2, and the terrestrial ecosystem carbon sink increased by 114.04 t CO2/km2/yr. This article provides a systematic spatial diagnosis of the carbon sequestration potential of terrestrial ecosystems, including karst inorganic carbon sinks, in the karst areas of Guangxi, and reveals their responses to the restoration of karst rocky desertification. This work has strong reference value and significance for the diagnosis and analysis of the carbon neutrality capacity at the national and global levels.