Deciphering the mechanisms that link biodiversity with ecosystem functions is critical to understanding the consequences of changes in biodiversity. The hypothesis that complementarity and selection effects drive relationships between biodiversity and ecosystem functions is well accepted, and an approach to statistically untangle the relative importance of these effects has been widely applied. In contrast, empirical demonstrations of the biological mechanisms that underlie these relationships remain rare. Here, on the basis of a field experiment with young trees, we provide evidence that one form of complementarity in plant communities - complementarity among crowns in canopy space - is a mechanism, related to light interception and use, that links biodiversity with ecosystem productivity. Stem biomass overyielding increased sharply in mixtures with greater crown complementarity. Inherent differences among species in crown architecture led to greater crown complementarity in functionally diverse species mixtures. Intraspecific variation, specifically neighbourhood-driven plasticity in crowns, further modified spatial complementarity and strengthened the positive relationship with overyielding - crown plasticity and inherent interspecific differences contributed near equally in explaining patterns of overyielding. We posit that crown complementarity is an important mechanism that may contribute to diversity-enhanced productivity in forests.