Does variation in environmental harshness explain local and regional species diversity gradients? We hypothesise that for a given life form like trees, greater harshness leads to a smaller range of traits that are viable and thereby also to lower species diversity. On the basis of a strong dependence of maximum tree height on site productivity and other measures of site quality, we propose maximum tree height as an inverse measure of environmental harshness for trees. Our results show that tree species richness is strongly positively correlated with maximum tree height across multiple spatial scales in forests of both eastern and western North America. Maximum tree height co-varied with species richness along gradients from benign to harsh environmental conditions, which supports the hypothesis that harshness may be a general mechanism limiting local diversity and explaining diversity gradients within a biogeographic region.