How historical and concurrent drought regulate plant diversity-productivity relationships through altering soil microbial communities remains a key knowledge gap. We addressed this gap with plant diversity-productivity relationship experiments under drought and ambient conditions over two phases (Phase I: soil conditioning, and Phase II: plant response). Our results reveal that plant diversity and drought interacted and caused divergent soil microbial communities in Phase I, leading to soil microbial legacies. These soil legacies interacted and caused more pronounced plant diversity-productivity relationships in Phase II, reflecting increased net biodiversity effects over time. Complementarity effects were most positive in plant communities with highest plant richness and in the Drought-Ambient (Phase I-II) treatment, and selection effects were most negative in these communities. Our results highlight the importance of soil microbial communities in driving positive plant diversity effects, and future rainfall changes can cause complicated patterns in the biodiversity-ecosystem functioning relationships through soil microbial legacy.