In experimental plant communities, relationships between biodiversity and ecosystem functioning have been found to strengthen over time, a fact often attributed to increased resource complementarity between species in mixtures and negative plant–soil feedbacks in monocultures. Here we show that selection for niche differentiation between species can drive this increasing biodiversity effect.