Diamonds and their inclusions are unique probes into the deep Earth, tracking the deep carbon cycle to >800 km. Understanding the mechanisms of carbon mobilization and freezing is a prerequisite for quantifying the fluxes of carbon in the deep Earth. Here we show direct evidence for the formation of diamond by redox reactions involving FeNi sulfides. Transmission Kikuchi Diffraction identifies an arrested redox reaction from pyrrhotite to magnetite included in diamond. The magnetite corona shows coherent epitaxy with relict pyrrhotite and diamond, indicating that diamond nucleated on magnetite. Furthermore, structures inherited from h-Fe3O4 define a phase transformation at depths of 320–330 km, the base of the Kaapvaal lithosphere. The oxidation of pyrrhotite to magnetite is an important trigger of diamond precipitation in the upper mantle, explaining the presence of these phases in diamonds.