Patchiness acts as an indicator of terrestrial ecosystem degradation and can lead to considerable loss of soil organic carbon and total nitrogen. However, quantitative assessments of the effects of patchiness on soil organic carbon and total nitrogen stocks and their associated mechanisms remain limited. This study aimed to explore the influence mechanisms of patchiness on soil organic carbon and total nitrogen stocks and to project the quantitative contribution of the further expansion of patchiness and vegetation recovery. Soil properties, soil organic carbon and total nitrogen stocks were investigated using a combination of field sampling and aerial photography in four grassland types, alpine meadow, alpine steppe, temperate grassland, and desert grassland, at 47 sites in northwestern China. Soil organic carbon and total nitrogen densities in the bare patches were 34–54 % and 23–41 % lower, respectively, compared to the original vegetation. At the plot-scale, current soil organic carbon and total nitrogen stocks ranged from 30.85 to 77.80 T/ha and 3.26 to 10.19 T/ha, respectively, across grassland types; with a 10–27 % and 7–24 % potential loss of soil organic carbon and total nitrogen stocks, respectively, from the further expansion of patchiness but a 10–50 % and 9–37 % potential increase in soil organic carbon and total nitrogen stocks, respectively, from vegetation recovery. Soil organic carbon and total nitrogen stocks were positively correlated with vegetation biomass, soil clay content, and precipitation (p < 0.001), whereas they were negatively correlated with patchiness (p < 0.001). In summary, patchiness reduced soil organic carbon and total nitrogen stocks by decreasing vegetation inputs and increasing erosion outputs, while vegetation recovery showed potential for increasing carbon and nitrogen stocks. Our results highlight that maintaining intact vegetation cover is critical for preserving terrestrial ecosystem carbon and nitrogen storage.