Abstract This study examined the effects of soil physicochemical properties (including heavy metal pollution) and vegetation parameters on soil basal respiration, microbial biomass, and the activity and functional richness of culturable soil bacteria and fungi. In a zinc and lead mining area (S Poland), 49 sites were selected to represent all common plant communities and comprise the area's diverse soil types. Numerous variables describing habitat properties were reduced by PCA to 7 independent factors, mainly representing subsoil type (metal-rich mining waste vs. sand), soil fertility (exchangeable Ca, Mg and K, total C and N, organic C), plant species richness, phosphorus content, water-soluble heavy metals (Zn, Cd and Pb), clay content and plant functional diversity (based on graminoids, legumes and non-leguminous forbs). Multiple regression analysis including these factors explained much of the variation in most microbial parameters; in the case of microbial respiration and biomass, it was 86% and 71%, respectively. The activity of soil microbes was positively affected mainly by soil fertility and, apparently, by the presence of mining waste in the subsoil. The mining waste contained vast amounts of trace metals (total Zn, Cd and Pb), but it promoted microbial performance due to its inherently high content of macronutrients (total Ca, Mg, K and C). Plant species richness had a relatively strong positive effect on all microbial parameters, except for the fungal component. In contrast, plant functional diversity was practically negligible in its effect on microbes. Other explanatory variables had only a minor positive effect (clay content) or no significant influence (phosphorus content) on microbial communities. The main conclusion from this study is that high nutrient availability and plant species richness positively affected the soil microbes and that this apparently counteracted the toxic effects of metal contamination.