The process of carbon capture and sequestration has been proposed as a method of mitigating the build-up of greenhouse gases in the atmosphere. If implemented, the cost of electricity generated by a fossil fuel-burning power plant would rise substantially, owing to the expense of removing CO2 from the effluent stream. There is therefore an urgent need for more efficient gas separation technologies, such as those potentially offered by advanced solid adsorbents. Here we show that diamine-appended metal-organic frameworks can behave as 'phase-change' adsorbents, with unusual step-shaped CO2 adsorption isotherms that shift markedly with temperature. Results from spectroscopic, diffraction and computational studies show that the origin of the sharp adsorption step is an unprecedented cooperative process in which, above a metal-dependent threshold pressure, CO2 molecules insert into metal-amine bonds, inducing a reorganization of the amines into well-ordered chains of ammonium carbamate. As a consequence, large CO2 separation capacities can be achieved with small temperature swings, and regeneration energies appreciably lower than achievable with state-of-the-art aqueous amine solutions become feasible. The results provide a mechanistic framework for designing highly efficient adsorbents for removing CO2 from various gas mixtures, and yield insights into the conservation of Mg(2+) within the ribulose-1,5-bisphosphate carboxylase/oxygenase family of enzymes.