How species coexist despite competing for the same resources that are in limited supply is central to our understanding of the controls on biodiversity1,2. Resource partitioning may facilitate coexistence, as co-occurring species use different sources of the same limiting resource3,4. In plant communities, however, direct evidence for partitioning of the commonly limiting nutrient, phosphorus (P), has remained scarce due to the challenges of quantifying P acquisition from its different chemical forms present in soil5. To address this, we used 33P to directly trace P uptake from DNA, orthophosphate and calcium phosphate into monocultures and mixed communities of plants growing in grassland soil. We show that co-occurring plants acquire P from these important organic and mineral sources in different proportions, and that differences in P source use are consistent with the species’ root adaptations for P acquisition. Furthermore, the net benefit arising from niche plasticity (the gain in P uptake for a species in a mixed community compared to monoculture) correlates with species abundance in the wild, suggesting that niche plasticity for P is a driver of community structure. This evidence for P resource partitioning and niche plasticity may explain the high levels of biodiversity frequently found in P-limited ecosystems worldwide6,7.