Human appropriation of land for agriculture has greatly altered the terrestrial carbon balance, creating a large but uncertain carbon debt in soils. Estimating the size and spatial distribution of soil organic carbon (SOC) loss due to land use and land cover change has been difficult but is a critical step in understanding whether SOC sequestration can be an effective climate mitigation strategy. In this study, a machine learning-based model was fitted using a global compilation of SOC data and the History Database of the Global Environment (HYDE) land use data in combination with climatic, landform and lithology covariates. Model results compared favorably with a global compilation of paired plot studies. Projection of this model onto a world without agriculture indicated a global carbon debt due to agriculture of 133 Pg C for the top 2 m of soil, with the rate of loss increasing dramatically in the past 200 years. The HYDE classes "grazing" and "cropland" contributed nearly equally to the loss of SOC. There were higher percent SOC losses on cropland but since more than twice as much land is grazed, slightly higher total losses were found from grazing land. Important spatial patterns of SOC loss were found: Hotspots of SOC loss coincided with some major cropping regions as well as semiarid grazing regions, while other major agricultural zones showed small losses and even net gains in SOC. This analysis has demonstrated that there are identifiable regions which can be targeted for SOC restoration efforts.