In forest ecosystems, many ecosystem functions such as tree growth are affected by tree species richness. This biodiversity–productivity relationship (BPR) is mediated by leaf traits, which themselves are known to be influenced by tree species richness; at the same time, as the primary organs of light capture, they are an important factor for tree growth. However, how tree growth is influenced by a tree's ability to phenotypically adjust its leaf traits to the within‐individual light gradient has largely been unexplored. Furthermore, it is not known how such impacts of within‐tree leaf trait variation on individual tree growth sums up to productivity at the community scale. In this study we tested how tree species richness, a tree's mean leaf traits, within‐tree leaf trait variation and the light extinction coefficient within a tree crown influence tree growth. We measured these variables in the temperate forest plantation of the Kreinitz biodiversity experiment. We found that the relationship between tree species richness and tree growth is mediated via the leaf trait variation of the individual trees, which in turn was modified by light availability. In particular, trees in monocultures show a higher within‐individual leaf trait variation, which partly compensates for the lack in among‐species leaf trait variation, and thus affects the BPR. It seems that tree richness operates both through increased acquisitive trait values and within‐individual leaf trait variation, two processes that cancelled out each other and resulted in the absence of a significant effect of tree richness on productivity in our study. In conclusion, to understand the BPR, it is important to study the underlying processes and to know which ones reinforce or oppose each other. In particular, our study highlights the importance of including within‐individual leaf trait variation in ecological research as one important moderator in the BPR.