Elucidating the dynamics of soil microbial diversity in coastal wetlands is essential for understanding the changes in ecological functions within these ecosystems, particularly in the context of climate change and improper management practices. In this study, the diversity patterns and influencing factors of soil bacterial and fungal communities in a muddy coastal wetland in China were investigated using Illumina sequencing of 16S rRNA and ITS1, across wetlands dominated by different vegetations and varying proximity to the coastline. The wetlands include four plots dominated by Spartina alterniflora (SA1), four plots dominated by Suaeda glauca (SG2), additional four plots of Suaeda glauca (SG3), and four plots dominated by Phragmites australis (PA4), ranging from the nearest to the coast to those farther away. The results revealed significant differences in bacterial richness (Observed_species index) and fungal diversity (Shannon index) across different wetlands, with SG3 demonstrating the lowest bacterial Observed_species value (1430.05), while SA1 exhibited the highest fungal Shannon value (5.55) and PA4 showing the lowest fungal Shannon value (3.10). Soil bacterial and fungal community structures differed significantly across different wetlands. The contents of soil available phosphorus and total phosphorus were the main drivers for fungal Observed_species and Shannon index, respectively. Soil organic carbon, pH, and salinity were indicated as the best predictors of bacterial community structure, accounting for 28.1% of the total variation. The total nitrogen content and soil salinity contributed mostly to regulating fungal community structure across different wetlands, accounting for 19.4% of the total variation. The results of this study offer a thorough understanding of the response and variability in soil microbial diversity across the muddy coastal wetlands in China.