Urban green space has been implicated in shaping airborne microbes, but there is an only rudimentary understanding of the key factors of urban green space affecting the composition and structures of airborne microbes. Here, we selected 40 urban sites based on stratified random sampling design and investigated the effects of multiple factors including landscapes, plant, soil, and anthropogenic factors on airborne microbial communities, especially bacterial and fungal pathogens. Bacterial and fungal communities in the control area with lower greenness were significantly (P < 0.05) different from those in other areas with a gradient of green space. The relative abundance of bacterial and fungal pathogens significantly (P < 0.05) decreased with increasing greenness. Other than soil thickness, soil type, slope position, and population density, plant species considerably contributed to the shift in the composition and abundance of potential bacterial and fungal pathogens. A significantly (P < 0.05) reduced abundance of bacterial and fungal pathogens was observed in areas with >30% masson pine. Together, these results provide insights into the importance of green space for providing health benefits for city dwellers by reducing pathogens in air, as well as providing support for the inclusion of plant species in the management of urban green space to reduce exposure risk of airborne pathogens.