Environmental heterogeneity is regarded as one of the most important factors governing species richness gradients. An increase in available niche space, provision of refuges and opportunities for isolation and divergent adaptation are thought to enhance species coexistence, persistence and diversification. However, the extent and generality of positive heterogeneity-richness relationships are still debated. Apart from widespread evidence supporting positive relationships, negative and hump-shaped relationships have also been reported. In a meta-analysis of 1148 data points from 192 studies worldwide, we examine the strength and direction of the relationship between spatial environmental heterogeneity and species richness of terrestrial plants and animals. We find that separate effects of heterogeneity in land cover, vegetation, climate, soil and topography are significantly positive, with vegetation and topographic heterogeneity showing particularly strong associations with species richness. The use of equal-area study units, spatial grain and spatial extent emerge as key factors influencing the strength of heterogeneity-richness relationships, highlighting the pervasive influence of spatial scale in heterogeneity-richness studies. We provide the first quantitative support for the generality of positive heterogeneity-richness relationships across heterogeneity components, habitat types, taxa and spatial scales from landscape to global extents, and identify specific needs for future comparative heterogeneity-richness research. © 2014 John Wiley & Sons Ltd/CNRS.