Plant and soil C:N:P ratios are of critical importance to productivity, food-web dynamics, and nutrient cycling in terrestrial ecosystems worldwide. Plant diversity continues to decline globally; however, its influence on terrestrial C:N:P ratios remains uncertain. By conducting a global meta-analysis of 2049 paired observations in plant species mixtures and monocultures from 169 sites, we show that, on average across all observations, the C:N:P ratios of plants, soils, soil microbial biomass and enzymes did not respond to species mixture nor to the species richness in mixtures. However, the mixture effect on soil microbial biomass C:N changed from positive to negative, and those on soil enzyme C:N and C:P shifted from negative to positive with increasing functional diversity in mixtures. Importantly, species mixture increased the C:N, C:P, N:P ratios of plants and soils when background soil C:N, C:P, and N:P were low, but decreased them when the respective background ratios were high. Our results demonstrate that plant mixtures can balance terrestrial plant and soil C:N:P ratios dependent on background soil C:N:P. Our findings highlight that plant diversity conservation does not only increase plant productivity, but also optimizes ecosystem stoichiometry for the diversity and productivity of today’s and future vegetation.