Abstract Supplementation of various Bacillus spp. has shown to improve growth performance, immune responses, and gut health of newly weaned pigs. The present study investigated the effects of dietary supplementation of 109 CFU/kg of Bacillus (B.) amyloliquefaciens on growth performance, diarrhea, systemic immunity, and intestinal microbiome of weaned pigs with or without enterotoxigenic Escherichia coli (ETEC) challenge. An antibiotic treatment was also included in the experiment to compare the efficacy of B. amyloliquefaciens vs. carbadox (50 mg/kg). ETEC challenge reduced (P < 0.05) growth rate but increased (P < 0.05) the frequency of diarrhea in pigs throughout the experiment. Supplementation of B. amyloliquefaciens tended (P < 0.10) to increase growth performance but had limited impacts on diarrhea of weaned pigs. ETEC challenge increased (P < 0.05) white blood cell (WBC) count on d 7 and 21 post-inoculation (PI), while supplementation of B. amyloliquefaciens tended (P < 0.10) to reduce WBC on d 7 PI and reduced (P < 0.05) WBC on d 21 PI, compared with control. No differences were observed in performance, diarrhea, and systemic immunity of pigs when comparing B. amyloliquefaciens with carbadox. Supplementation of B. amyloliquefaciens and antibiotics had different impacts on intestinal microbiome. ETEC challenge increased (P < 0.05) relative abundance of Lactobacillus in feces on d 7 PI but reduced (P < 0.05) relative abundance of Prevotella in feces on d 21 PI. Prior ETEC challenge, Lachnospiraceae was less (P < 0.05) abundant in feces of pigs supplemented with B. amyloliquefaciens than pigs in carbadox group on d 0 before ETEC infection. The relative abundance of Enterobacteriaceae in fecal samples was the lowest (P < 0.05) in pigs supplemented with carbadox among all treatment on d 0. On d 14 and 21 PI, the relative abundance of Actinobacteria in feces was the lowest (P < 0.05) in carbadox treatment among all treatment of the experiment. Ileal digesta were also collected on d 21 PI to analyze intestinal microbiota diversity changes among treatments. The Shannon diversity index was greater (P < 0.05) in ileal digesta of pigs supplemented with B. amyloliquefaciens than pigs supplemented with carbadox. ETEC reduced (P < 0.05) the relative abundance of Firmicutes and Lactobacillus and increased (P < 0.05) the relative abundance of Proteobacteria and Lachnospiraceae in ileal digesta. Under ETEC challenge, pigs supplemented with B. amyloliquefaciens had lower (P < 0.05) abundance of Firmicutes and Clostridiaceae and greater (P < 0.05) abundance of Lachnospiraceae in the ileum than pigs supplemented with carbadox. In conclusion, supplementation of B. amyloliquefaciens had similar impacts on growth performance and systemic immunity but had different impacts on intestinal microbiota of weaned pigs in comparison to carbadox.