Our study revealed the varied community composition and assembly mechanism of microbial communities between healthy and diseased tobacco plants along the soil-root continuum, providing new insights into niche-specific defense mechanisms against pathogen invasions. These findings may underscore the potential utilization of different functional prebiotics to enhance plants' ability to fend off pathogens.