Green spaces in subtropical cities are important for providing ecological services that support human well-being and serve as reservoirs for diverse microbial communities, which in turn support ecosystem functions. However, a few studies have explored the microbial community characteristics and public health risks associated with putative pathogens in various urban green spaces exposed to anthropogenic stress. To address this gap, we collected leaf litter from forests, greenbelts, parklands, and wetlands across Wuhan City and analyzed the bacterial and fungal communities using next-generation sequencing (NGS) techniques. For bacterial and fungal communities, alpha diversity was significantly higher in low-traffic zones, including forests, wetlands, greenbelts, and parklands. Beta diversity analysis revealed distinct clustering of bacterial and fungal communities according to urban green space type. Anthropogenic (foot traffic) influenced green space type to shape microbial community structure, function, and stability, with shifts significantly associated with soil physicochemical properties via mental test and redundancy analysis. Notably, the microbial index for potential pathogenic bacteria in the studied areas was 0.001, suggesting a low risk to public health in the region. Our findings provide important information for the sustainable management of urban green spaces by regulating microbial communities, offering new insights into the health of ecosystems and human well-being.