Very low seismic velocity anomalies in the Earth's mantle may reflect small amounts of melt present in the peridotite matrix, and the onset of melting in the Earth's upper mantle is likely to be triggered by the presence of small amounts of carbonate. Such carbonates stem from subducted oceanic lithosphere in part buried to depths below the 660-kilometre discontinuity and remixed into the mantle. Here we demonstrate that carbonate-induced melting may occur in deeply subducted lithosphere at near-adiabatic temperatures in the Earth's transition zone and lower mantle. We show experimentally that these carbonatite melts are unstable when infiltrating ambient mantle and are reduced to immobile diamond when recycled at depths greater than ∼250 kilometres, where mantle redox conditions are determined by the presence of an (Fe,Ni) metal phase. This 'redox freezing' process leads to diamond-enriched mantle domains in which the Fe(0), resulting from Fe(2+) disproportionation in perovskites and garnet, is consumed but the Fe(3+) preserved. When such carbon-enriched mantle heterogeneities become part of the upwelling mantle, diamond will inevitably react with the Fe(3+) leading to true carbonatite redox melting at ∼660 and ∼250 kilometres depth to form deep-seated melts in the Earth's mantle.