Soil microorganisms can be used as one of the important indicators of wetland ecosystem restoration. To study the effects of different restoration stages on soil microbial community composition and diversity in Naolihe Wetland, we employed a “time and space parallel” method. Four restoration stages, namely corn field (Corn), short-term restoration wetland (2 years, ST), long-term restoration wetland (8 years, LT) and natural wetland (>25 years, NW), were selected to represent the restoration time and geographical location in Naolihe Nature Wetland. We investigated the composition and diversity of soil microbial communities in different restoration wetland (from corn fields to natural wetlands) by using 16S rRNA and ITS rRNA gene sequencing. We also performed chemical experiments to measure soil enzyme activity and physicochemical properties at each sampling site. The results showed that soil physicochemical properties and enzyme activities significantly differed with the extension of wetland restoration years (p < 0.05). Proteobacteria, Acidobacteria, and Actinobacteria are the most dominant phyla in bacterial. The alpha diversity of soil bacteria was the highest in the corn field (Corn), and ST-LT-NW first decreased and then increased with the extension of wetland restoration years. There are two most dominant phyla (Ascomycota and Mucoromycota) in fungal. However, the alpha diversity of soil fungi was the lowest in the Corn and LT stage, and ST-LT-NW first decreased and then increased with the extension of wetland restoration years. The research findings indicated that the changes in soil physicochemical properties with the extension of wetland restoration years play a significant role in shaping the structure and diversity changes of soil microbial communities. Through the analyses of bacterial and fungal functions using the FUNGuild and FAPROTAX databases, the results showed that the abundance of aerobic bacteria in the soil increased more than that of anaerobic bacteria as the wetland restoration years prolonged, while the abundance of saprotrophic, symbiotic, and pathogenic fungi in the soil significantly decreased with the prolonged wetland restoration years. This study will help us better understand the process of restoration after farmland abandonment, providing valuable reference information for the implementation of a series of wetland ecological restoration projects in the future.