Plants, with an estimated 300,000 species, provide crucial primary production and ecosystem structure. To date, our quantitative understanding of diversity gradients of megadiverse clades such as plants has been hampered by the paucity of distribution data. Here, we investigate the global-scale species-richness pattern of vascular plants and examine its environmental and potential historical determinants. Across 1,032 geographic regions worldwide, potential evapotranspiration, the number of wet days per year, and measurements of topographical and habitat heterogeneity emerge as core predictors of species richness. After accounting for environmental effects, the residual differences across the major floristic kingdoms are minor, with the exception of the uniquely diverse Cape Region, highlighting the important role of historical contingencies. Notably, the South African Cape region contains more than twice as many species as expected by the global environmental model, confirming its uniquely evolved flora. A combined multipredictor model explains approximately 70% of the global variation in species richness and fully accounts for the enigmatic latitudinal gradient in species richness. The models illustrate the geographic interplay of different environmental predictors of species richness. Our findings highlight that different hypotheses about the causes of diversity gradients are not mutually exclusive, but likely act synergistically with water-energy dynamics playing a dominant role. The presented geostatistical approach is likely to prove instrumental for identifying richness patterns of the many other taxa without single-species distribution data that still escape our understanding.