Anthropogenic activities can lead to the loss of soil organic carbon (SOC) or improve its storage, hence they have the potential to exacerbate or help mitigate climate change. Urban expansion results in an initial loss of soil carbon, but long-term SOC changes during urban development are poorly understood. Herein, we studied SOC changes in the suburban and urban areas of cities with high levels of urbanization based on a long-term resampling campaign in Beijing, and a compilation of SOC content data from 21 other cities with high levels of urbanization across China over the past three decades. Our results revealed that the SOC of topsoils decreased by 17.2% in the suburban areas and increased by 104.4% in the urban areas of cities with high levels of urbanization. The changes in SOC were positively correlated with the changes in vegetation coverage and productivity. Partial least square method structural equation model analyses showed that changes in vegetation could directly affect SOC changes, and the changes in vegetation coverage and productivity were induced by human activities and climate changes in Beijing. The topsoils in the urban areas of cities with high levels of urbanization can act as carbon sinks due to the increase in vegetation. This study can help improve our understanding of the role of the SOC content of cities within the global C cycle and provide suggestions for achieving the goal of carbon neutrality in China.