Rapid urbanization has reshaped land cover and the ecological environment, potentially improving or deteriorating soil organic carbon (SOC). However, the response of SOC to urbanization has not yet been fully exploited. Herein, by using the land-use transfer matrix, the Sen & Mann-Kendall tests, the Hurst index, and a geographical and temporal weighted regression (GTWR) model, as well as an urban-rural gradient perspective, we assessed the dynamic response of SOC to Beijing's urbanization from 2001 to2015 and identified the main drivers. The results found that SOC stock decreased by 7651.50 t C during the study period. SOC density varied significantly along an urban-rural gradient, with high value areas mainly being located in remote mountainous rural areas and low value areas mainly being located in urban areas on the plains. There was an uneven variation in SOC density across the urban-rural gradient, with suburban areas (25-40 km away from urban cores) losing the most SOC density while urban areas and rural areas remained relatively unchanged. GTWR model revealed the spatio-temporal non-flat stability of various driving forces. Precipitation, the proportion of forest, the proportion of grassland, the population, distance to the urban center, the slope, and the silt content are the main factors related to SOC stock change. As a result, we suggest policy makers reconceptualize the uneven variation in the SOC between urban and rural areas, emphasize suburban areas as a target for controlling SOC loss, and take into consideration the spatial and temporal heterogeneity of the factors influencing SOC stock when evaluating policies.