Projections of spatial biodiversity dynamics under climate warming are often based on models including only climate variables, and when non-climatic factors (e.g. soil) are included, data are often at much coarser spatial resolutions than those experienced by plants. Field studies along elevation gradients permit the gathering of detailed soil data, while still covering a wide climatic gradient. Here, an intensive field survey of four spring forest herbs along an elevation gradient showed that soil properties had substantial impacts on the occurrence/abundance of all species, and that soil effects were more pronounced at higher elevations. For Trillium erectum and Claytonia caroliniana, very infrequent occurrences at high elevation were strongly associated with rare microsites with high pH or nutrients. In a seven-year transplant experiment with T. erectum, we found that individuals grew to much smaller sizes at high than low elevation, suggesting that environmental factors rather than dispersal limitation constrain the species' upper range limit, despite substantial warming in recent decades. Our study demonstrates that soil factors interact strongly with climate to determine plant range limits along climatic gradients. Unsuitable soils for plants at high elevations or latitudes may represent an important constraint on future plant migration and biodiversity change. This article is part of the theme issue 'Ecological novelty and planetary stewardship: biodiversity dynamics in a transforming biosphere'.