Clay minerals retain or adsorb metal ions in the Earth’s critical zone. Rocks, sediments and soils rich in clay minerals can concentrate rare earth elements (REEs) in ion adsorption-type deposits (IADs) and are similarly effective at metallic contaminant remediation. However, the molecular-scale chemical and physical mechanisms of metal ion retention remain only partly understood. In this Review, we describe the nature, location and energy requirements of metal retention at clay mineral surfaces. Retention originates mainly from electrostatic interactions during cation exchange at low pH and chemical bonding in surface complexation and precipitation at neutral and high pH. Surface complexation can induce surface redox reactions and precipitation mechanisms including neoformation of clay mineral layered structures. In IADs, outer-sphere adsorption is the major retention mechanism of REE ions. By contrast, the use of clay minerals in pollution control relies on various mechanisms that can coexist, including cation exchange, surface complexation and nucleation growth. To more effectively leverage clay mineral–metal interactions in resource recovery and contaminant remediation, complex mechanisms such as surface precipitation and redox reactions must be better understood; for instance, by utilizing advances in quantum mechanical calculations, close combination between synchrotron and simulation techniques, and upscaling of molecular-level information in macroscopic thermokinetic predictive models.