The Janzen–Connell hypothesis suggests that highly specific pathogens decrease seedling survival close to the parent plant; however, the underlying mechanism remains unclear. Here, we tested the host specificity of soil pathogens to germinating seeds of Cyclobalanopsis fleuryi and Cryptocarya chinensis in tropical montane rain forest and cloud forest on Hainan, south China. Rhizospheric soils surrounding eight adult trees per species were collected in each forest type and divided into five soil treatments: parent, fungicide-sterilized, autoclave-sterilized, Fusarium-added and Pythium-added soils. Surface-sterilized seeds were sown in each of the five soil treatments and grown in two forest types. The seed germination percentages were significantly higher in sterilized soils (C. fleuryi, 41.5%; C. chinensis, 29.4%) than in non-sterilized soils (C. fleuryi, 28.3%; C. chinensis, 17.1%) in montane rain forest. The seed germination percentages in rhizospheric soil of conspecific parent trees were significantly lower in montane rain forest (C. fleuryi, 17.3%; C. chinensis, 10.5%) than in cloud forest (C. fleuryi, 37.1%; C. chinensis, 21.1%). Our results also suggest that the level of pathogen activity in each tree species varies depending on the environment. Our results support the hypothesis that host-specific pathogens shape tree species composition by differentially affecting seed germination under different environmental conditions.