This paper stresses that the mechanism of coexistence is the key to understanding the relationship between species richness and community productivity. Using model plant communities, we explored two general kinds of mechanisms based on resource heterogeneity and recruitment limitation, with and without any trade-off between reproductive and competitive abilities. We generated different levels of species richness by changing model parameters, in particular the number of species in the regional pool, the degree of recruitment limitation, and the level of heterogeneity. Different diversity–productivity patterns are obtained with different coexistence mechanisms, indicating there is no reason to expect any general relationship between species richness and productivity. We discuss these results in the context of the within-site and across-site aspects of the relationship between species richness and productivity. Furthermore, we extend these results to hypothesize the relationship between species richness and productivity for other coexistence mechanisms not explicitly considered here.