The presence and reproduction of pathogens in soil environment have significant negative impacts on soil security and human health in urban-rural ecosystem. Rapid urbanization has dramatically changed the land use, soil ecosystems, and the presence of pathogens in soil environment, however, the risk associated with soil pathogens remains unknown. Identifying the potential risk of pathogens in soils in urban-rural ecosystem has become an urgent issue. In this study, we established a risk evaluation method for soil pathogens based on analytic hierarchy process and entropy methods to quantitatively estimate the potential risk of soil pathogens to children and adults in urban-rural ecosystem. The abundance and species number of soil pathogens, network structure of soil microbial community, and human exposure factors were considered with 12 indicators to establish the risk evaluation system. The results revealed that 19 potential pathogenic bacteria were detected in soils within a typical urban-rural ecosystem. Substantial differences were observed in both abundance and species of soil pathogens as well as network structure of soil microbial community from urban to rural areas. Urban areas exhibited relatively lower levels of soil pathogenic abundance, but the microbial network was considerably unstable. Rural areas supported relatively higher levels of soil pathogenic abundance and stable microbial networks. Notably, peri-urban areas showed relatively unstable microbial networks alongside higher levels of soil pathogenic abundance compared to other areas. The risk evaluation of soil pathogens for both adults and children showed that peri-urban areas presented the highest potential risk, with children being more susceptible than adults to threats posed by soil pathogens in both urban and peri-urban areas. The established evaluation system provides an innovative approach for quantifying risk of soil pathogens at regional scale and can be used as a reference for preventing soil pathogens contamination and enhancing soil health in areas with intense human activities.