Aim: Biodiversity and ecosystem productivity vary across the globe, and considerable effort has been made to describe their relationships. Biodiversity and ecosystem functioning research has traditionally focused on how experimentally controlled species richness affects net primary productivity (S → NPP) at small spatial grains. In contrast, the influence of productivity on richness (NPP → S) has been explored at many grains in naturally assembled communities. Mismatches in spatial scale between approaches have fuelled debate about the strength and direction of biodiversity–productivity relationships. Here, we examine the direction and strength of the influence of productivity on diversity (NPP → S) and the influence of diversity on productivity (S → NPP) and how these vary across spatial grains. Location: Contiguous USA. Time period: 1999–2015. Major taxa studied: Woody species (angiosperms and gymnosperms). Methods: Using data from North American forests at grains from local (672 m2) to coarse spatial units (median area = 35,677 km2), we assess relationships between diversity and productivity using structural equation and random forest models, while accounting for variation in climate, environmental heterogeneity, management and forest age. Results: We show that relationships between S and NPP strengthen with spatial grain. Within each grain, S → NPP and NPP → S have similar magnitudes, meaning that processes underlying S → NPP and NPP → S either operate simultaneously or that one of them is real and the other is an artefact. At all spatial grains, S was one of the weakest predictors of forest productivity, which was largely driven by biomass, temperature and forest management and age. Main conclusions: We conclude that spatial grain mediates relationships between biodiversity and productivity in real-world ecosystems and that results supporting predictions from each approach (NPP → S and S → NPP) serve as an impetus for future studies testing underlying mechanisms. Productivity–diversity relationships emerge at multiple spatial grains, which should widen the focus of national and global policy and research to larger spatial grains.