Habitat divergence among close relatives is a common theme in ecology. While recent studies have frequently found that the abundance and diversity of plant species are regulated by soil microbes, little is known whether soil microbes can also affect the habitat distributions of plants. To fill in this knowledge gap, we investigated whether interactions with soil microbes restrict habitat distributions of closely related oaks (Quercus spp.) in eastern North America. We performed a soil inoculum experiment using two pairs of sister species that show habitat divergence: Quercus alba (local species) vs. Q. michauxii (foreign), and Q. shumardii (local) vs. Q. acerifolia (foreign). To test whether host-specific soil microbes are responsible for habitat restriction, we investigated the impact of local sister live soil (containing soil microbes associated with local sister species) on the survival and growth of local and foreign species. Secondly, to test whether habitat-specific soil microbes are responsible for habitat restriction, we also examined the effect of local habitat live soil (containing soil microbes within local sister’s habitats, but not directly associated with roots of local sister species) on the seedlings of local and foreign species. We found that local sister live soil decreased the survival and biomass of foreign species’ seedlings while increased those of local species, which supports the roles of host-specific microbes in mediating habitat exclusion. In contrast, local habitat live soil did not differentially affect the survival or biomass of the local vs. foreign sister species, providing no support for the roles of habitat-specific microbes. Our study indicates that soil microbes associated with one sister species can suppress the recruitment of the other host species, contributing to habitat partitioning of the closely related oaks. Our findings emphasize that considering the complex interactions with soil microbes is essential for understanding habitat distributions of closely related plants.