Recent studies suggested that tree diversity should promote forest productivity under on-going climate warming, at least in temperate and boreal biomes. However, this pattern has been mostly highlighted though simulations and has been rarely tested with observations yet, which limits our understanding of how forest ecosystems are responding to climate change and adapting to new conditions. In this study, we investigated the relationship between forest productivity and diversity using 25,838 observations from France between 2000 and 2015 to understand how contemporary climate warming has influenced forest productivity over 15 years. Our findings indicate that tree diversity more strongly promotes forest productivity when recent climate warming exacerbates water stress in low-density forest stands already constrained by soil water availability. This promoting effect of tree diversity on forest productivity under climate warming decreased as tree density increased and as trees had grown in less water-limited areas. Our results demonstrate that species mixture generally enhances forests' resistance to increased soil water deficit. Given the expected strengthening of global warming in the coming decades, forest management should therefore promote tree diversity for sustaining wood productivity and carbon storage, especially in water-limited conditions. Forester should also consider tree density in their management planing in order to not annihilate the positive effect of tree diversity on forest productivity.