A significant portion of the Earth’s biodiversity and biomass is from the subsurface biosphere, where chemotrophic microbial species harness diverse inorganic oxidation-reduction reactions (redox reactions) as a major source of metabolic energy while driving biogeochemical cycles. Given the limited availability of energy in the anaerobic environment, a fundamental question concerns what interplay between the chemical environment and chemotrophic community enables the persistence of whole biogeochemical systems. Here, using a thermodynamics-based mechanistic model that maps the interplay between diverse chemotrophic species and chemical compounds onto a redox network, we show that cycles of redox reactions mediate chemotrophic interactions in a way that increases the complexity of both redox reaction networks and microbial communities and enhances the community-level efficiency of energy metabolism. The high efficiency and complexity of biogeochemical systems arises from the self-organised ecological niche segmentation of microbes. More specifically, a consortium of chemotrophic species that subdivide a long-reaction pathway into shorter-reaction segments enhance each other’s population growth, replaces the species that monopolises the long-reaction pathway, and increases ecosystem productivity. An ecologically driven ‘division of metabolic labour’ in the chemotrophic community provides a novel mechanism through which an intimate life-environment interplay concurrently enhances biodiversity and ecosystem productivity.