Soil fungal community plays an important role in forest ecosystems, and forest secondary succession is a crucial driver of soil fungal community. However, the driving factors of fungal community and function during temperate forest succession and their potential impact on succession processes are poorly understood. In this study, we investigated the dynamics of the soil fungal community in three temperate forest secondary successional stages (shrublands, coniferous forests, and deciduous broadleaf forests) using high-throughput DNA sequencing coupled with functional prediction via the FUNGuild database. We found that fungal community richness, α-diversity, and evenness decreased significantly during the succession process. Soil available phosphorus and nitrate nitrogen decreased significantly after initial succession occurred, and redundancy analysis showed that both were significant predictors of soil fungal community structure. Among functional groups, fungal saprotrophs as well as pathotrophs represented by plant pathogens were significantly enriched in the early-successional stage, while fungal symbiotrophs represented by ectomycorrhiza were significantly increased in the late-successional stage. The abundance of both saprotroph and pathotroph fungal guilds was positively correlated with soil nitrate nitrogen and available phosphorus content. Ectomycorrhizal fungi were negatively correlated with nitrate nitrogen and available phosphorus content and positively correlated with ammonium nitrogen content. These results indicated that the dynamics of fungal community and function reflected the changes in nitrogen and phosphorus availability caused by the secondary succession of temperate forests. The fungal plant pathogen accumulated in the early-successional stage and ectomycorrhizal fungi accumulated in the late-successional stage may have a potential role in promoting forest succession. These findings contribute to a better understanding of the response of soil fungal communities to the secondary forest succession process and highlight the importance of fungal communities during temperate forest succession.