Warming temperatures tend to damage crop yields, yet the influence of water supply on global yields and its relation to temperature stress remains unclear. Here, we use satellite-based measurements to provide empirical estimates of how root-zone soil moisture and surface air temperature jointly influence the global productivity of maize, soybeans, millet, and sorghum. Relative to empirical models using precipitation as a proxy for water supply, we find that models using soil moisture explain 30% to 120% more of the interannual yield variation across crops. Models using soil moisture also better separate water supply stress from correlated heat stress and show that soil moisture and temperature contribute roughly equally to historical variations in yield. Globally, our models project yield damages of -9% to -32% across crops by end-of-century under SSP5-8.5 from changes in temperature and soil moisture. By contrast, projections using temperature and precipitation overestimate damages by 28% to 320% across crops both because they confound stresses from dryness and heat and because changes in soil moisture and temperature due to climate change diverge from their historical association. Our results demonstrate the importance of accurately representing water supply for predicting changes in global agricultural productivity and for designing effective adaptation strategies.