Growing threats from extreme climatic events and biodiversity loss have raised concerns about their interactive consequences for ecosystem functioning. Evidence suggests that biodiversity is crucial to buffer ecosystem functioning facing climatic extremes. However, whether evolutionary processes in species mixtures underpin such biodiversity-dependent stabilizing effects remains elusive. We tested this hypothesis by exposing experimental mixtures of grassland species to eight recurrent summer droughts vs. control in the field. Seed offspring of 12 species were subsequently grown individually, in monocultures or in 2-species mixtures and subjected to a novel drought event in the glasshouse. Comparing mixtures with monocultures, drought-selected plants showed greater between-species complementarity than ambient-selected plants when recovering from the drought event, which led to greater biodiversity effects on community productivity and better recovery of drought-selected mixtures after the drought. These findings suggest biodiversity can buffer the impacts of extreme climatic events through evolution of species complementarity.