Earth is the only known habitable planet in the solar system. Although there are half a dozen planetary moons that may have habitable zones beneath their surfaces, astronomers have yet to find an exoplanet with conditions deemed suitable for life on its surface. From a geological point of view, Earth’s distinctive features include the presence of life, the abundance of liquid water, the long-term tectonic system and the profusion of organic carbon in contact with the oxygen-bearing atmosphere. The carbon cycle inextricably binds biological life at the surface with carbon on the move in the interior. Through laboratory experiments, we have discovered that, following subduction, carbon-bearing materials undergo great transformation in the high-pressure hothouse of the mantle. Earth’s subduction factory plays a key role in the deep carbon cycle by feeding the mantle with different carbon phases, four-fifths of which are carbonates and one-fifth organic carbon, proportions that have remained relatively stable since Earth’s biosphere became established.