Three decades of research have demonstrated that biodiversity can promote the functioning of ecosystems. Yet, it is unclear whether the positive effects of biodiversity on ecosystem functioning will persist under various types of global environmental change drivers. We conducted a meta-analysis of 46 factorial experiments manipulating both species richness and the environment to test how global change drivers (i.e. warming, drought, nutrient addition or CO2 enrichment) modulated the effect of biodiversity on multiple ecosystem functions across three taxonomic groups (microbes, phytoplankton and plants). We found that biodiversity increased ecosystem functioning in both ambient and manipulated environments, but often not to the same degree. In particular, biodiversity effects on ecosystem functioning were larger in stressful environments induced by global change drivers, indicating that high-diversity communities were more resistant to environmental change. Using a subset of studies, we also found that the positive effects of biodiversity were mainly driven by interspecific complementarity and that these effects increased over time in both ambient and manipulated environments. Our findings support biodiversity conservation as a key strategy for sustainable ecosystem management in the face of global environmental change.