Ensuring soil health is a key agroecological principle. Widespread land degradation at global scales represents a critical market failure for conventional agriculture. Agroecological approaches rest on the premise that the use of agro-biodiversity and recycling, coupled with phasing out environmentally-disruptive chemical inputs, will promote the maintenance of soil organic carbon and diverse soil biota, thereby ensuring soil health. Key evidence gaps remain, however, in linking specific agroecological practices to soil biotic function. Recent advances in metagenomics can help us to unlock these, and to better understand nutrient cycles at farm and landscape scales.