Interactions between crustal and mantle reservoirs dominate the surface inventory of volatile elements over geological time, moderating atmospheric composition and maintaining a life-supporting planet. While volcanoes expel volatile components into surface reservoirs, subduction of oceanic crust is responsible for replenishment of mantle reservoirs. Many natural, ‘superdeep’ diamonds originating in the deep upper mantle and transition zone host mineral inclusions, indicating an affinity to subducted oceanic crust. Here we show that the majority of slab geotherms will intersect a deep depression along the melting curve of carbonated oceanic crust at depths of approximately 300 to 700 kilometres, creating a barrier to direct carbonate recycling into the deep mantle. Low-degree partial melts are alkaline carbonatites that are highly reactive with reduced ambient mantle, producing diamond. Many inclusions in superdeep diamonds are best explained by carbonate melt–peridotite reaction. A deep carbon barrier may dominate the recycling of carbon in the mantle and contribute to chemical and isotopic heterogeneity of the mantle reservoir.