Phyllosphere fungi have high species diversity and influence host fitness and ecosystem functioning, but their community assembly mechanisms in forest ecosystems are poorly understood. Here, we examined phyllosphere epiphytic and endophytic fungal communities in a Chinese subtropical tree species richness experiment (from 1 to 16 species, BEF-China), using amplicon sequencing targeting the internal transcribed spacer 1 region of the rDNA. The community assembly of epiphytic and endophytic fungi was predominantly structured by stochastic process, with a higher contribution of dispersal limitation on epiphytic than on endophytic fungal communities but a higher contribution of selection on endophytic than on epiphytic fungal communities. The plant-epiphytic fungus interaction network was more complex than the plan-endophytic fungus interaction network. Furthermore, tree species diversity level was positively related to the diversity of epiphytic (α-, β- and γ-diversity) and endophytic (γ- diversity) fungi and the complexity of the network of epiphytic and endophytic fungi, but not related to the contribution of the different ecological processes in community assembly of epiphytic and endophytic fungi in the subtropical forest.