The effects of drought on soil dynamics after fire are poorly known, particularly its long-term (i.e., years) legacy effects once rainfall returns to normal. Understanding this is particularly important for nutrient-poor soils in semi-arid regions affected by fire, in which rainfall is projected to decrease with climate change. Here, we studied the effects of post-fire drought and its legacy on soil microbial community structure and functionality in a Cistus-Erica shrubland (Spain). Rainfall total and patterns were experimentally modified to produce an unburned control (natural rainfall) and four burned treatments: control (natural rainfall), historical control (long-term average rainfall), moderate drought (percentile 8 historical rainfall, 5months of drought per year), and severe drought (percentile 2, 7months of drought). Soil nutrients and microbial community composition (ester-linked fatty acid approach) and functionality (enzyme activities and C mineralization rate) were monitored during the first 4years after fire under rainfall treatments, plus two additional ones without them (six post-fire years). We found that the recovery of burned soils was lower under drought. Post-fire drought increased nitrate in the short term and reduced available phosphorus, exchangeable potassium, soil organic matter, enzyme activities, and carbon mineralization rate. Moreover, drought decreased soil total microbial biomass and fungi, with bacteria becoming relatively more abundant. Two years after discontinuing the drought treatments, the drought legacy was significant for available phosphorus and enzyme activities. Although microbial biomass did not show any drought legacy effect, the proportion of fungi and bacteria (mainly gram-positive) did, being lower and higher, respectively, in former drought-treated plots. We show that drought has an important impact on soil processes, and that some of its effects persist for at least 2years after the drought ended. Therefore, drought and its legacy effects can be important for modeling biogeochemical processes in burned soils under future climate change.