Urbanization has significantly increased heavy metal contamination in urban soils, adversely affecting soil microorganisms, which are vital indicators of soil quality. However, the effects of urbanization-induced metal pollution on soil microbial communities remains largely underestimated. This study examines soil microbial communities and properties beneath the canopy of three deciduous and three evergreen trees in urban parks, situated at varying distances from the city center. The results demonstrated that urbanization consistently alters soil physicochemical properties, including pH, soil moisture, and specific heavy metal contents (e.g., Zn, Mn, Cr). The α-diversity of soil bacterial community was significantly influenced by pH and specific heavy metals (e.g., Cr, Cd), whereas the α-diversity of fungal community was affected by pH, independent of heavy metal concentrations. The response of heavy metal content to urbanization exhibited a consistent pattern across both deciduous and evergreen trees, although the effect differed between these tree types. Furthermore, urbanization impacts the diversity, structure, composition and network of soil microbial communities. Notably, the Shannon index of soil fungal communities under deciduous species shows an initial increase, followed by a decline as urbanization intensifies. In contrast, the Simpson index of soil bacteria under evergreen tree species decreases with increased urbanization. Moreover, urbanization alters soil bacterial networks, with higher network density observed in less urbanized areas. It may also affect microbial functions, such as xenobiotic and lipid metabolism. This study provided a theoretical basis for urban park soil management, which is crucial for enhancing urban soil ecosystem services and mitigating the adverse effects of urbanization.