An 8‐week feeding trial was conducted to investigate the effects of host‐associated Bacillus megaterium R32 and stachyose on the intestinal mucosal defense system of turbot (Scophthalmus maximus. L). Three isonitrogenous and isolipidic diets were formulated: control diet (C), control diet with 1.0 × 108 CFU/g B. megaterium R32 (RC), and 1.0 × 108 CFU/g B. megaterium R32 + 1.5% stachyose (RS) supplementation separately. The results showed that diets RS and RC significantly inhibited the expression of cell development and apoptosis‐related genes (β-catenin, CyclinD1, BAX, Bid); diets RS and RC significantly increased the expression of intestinal tight junction protein claudin-4, while RS group significantly decreased the expression of myosin light chain kinase; diets RS and RC significantly decreased the expression of proinflammatory factors (IL-13, IL-15, IFN- γ), diet RS also significantly decreased the expression of TNF-α and AP-1, and increased the expression of TGF-β. 16s rRNA gene sequencing results showed that diets RS and RC significantly decreased the abundance of conditional pathogenic bacteria (Corynebacterium, Desulfovibrio, Escherichia-Shigella). Among them, the abundance of Bacillus in the RS group was the highest. It is concluded that the combination of stachyose and B. megaterium R32 had a more positive effect on intestinal cell development and barrier function and strengthened the intestinal mucosal defense system of turbot.