Studying the spatial and temporal changes of grassland soil organic carbon (SOC) is helpful in promote the management of regional ecosystem carbon sinks. Grazing is one of the main ways of rational utilization of grassland. Different grazing intensities will affect the change of SOC density. Under different grazing intensity and management measures in Zhangye grassland, this study uses the parameter localized CENTURY model to simulate the temporal and spatial variations of SOC density from 1970 to 2022. The results showed that long-term light grazing reduced the average SOC by 195.114 g·m−2 and 1.91%. Moderate and severe grazing, respectively, for a long time made the total SOC density loss of 5.21% and 17.69%. In a short period, mild and moderate grazing reduced total SOC first and then increased it. Under light grazing, total SOC density appeared higher relative changes in the southeast, and lower in the northwest and central. There was no significant difference in the relative changes of total SOC between steppe and desert grasslands under light grazing. The decrease range of steppe was gradually greater than that in desert grassland. Since different management measures were implemented in some sampling sites in 2017, we divided the study period into two periods, 1970–2016 and 2017–2022. The implementation of degraded grassland improvement, fallow grazing, and rotational grazing would increase the total SOC density and mild SOC density, rotational grazing > degraded grassland improvement > rest grazing. Rotational grazing and the improvement of degraded grassland increased the density of active and inert SOC, while resting grazing decreased the density of SOC.