Soil plant-pathogenic (PF) and mycorrhizal fungi (MF) are both important in maintaining plant diversity, for example via host-specialized effects. However, empirical knowledge on the degree of host specificity and possible factors affecting the fungal assemblages is lacking. We identified PF and MF in fine roots of 519 individuals across 45 subtropical tree species in southern China in order to quantify the importance of host phylogeny (including via its effects on functional traits), habitat and space in determining fungal communities. We also compared host specificity in PF and MF at different host-phylogenetic scales. Our study suggests that host-phylogenetic effects dominate the assembly of both PF and MF communities, resulting from phylogenetically clustered plant traits. The scale-dependent host specificity implies that PF were specialized at lower-level and MF at higher-level host taxa.