This study was conducted to investigate the effects of a direct-fed microbial (DFM) product (Bacillus subtilis strain DSM 32540) in weaned pigs challenged with K88 strain of Escherichia coli on growth performance and indicators of gut health. A total of 21 weaned pigs [initial body weight (BW) = 8.19 kg] were housed individually in pens and fed three diets (seven replicates per diet) for 21 d in a completely randomized design. The three diets were a corn-soybean meal-based basal diet without feed additives, a basal diet with 0.25% antibiotics (neo-Oxy 10-10; neomycin + oxytetracycline), or a basal diet with 0.05% DFM. All pigs were orally challenged with a subclinical dose (6.7 × 108 CFU/mL) of K88 strain of E. coli on day 3 of the study (3 d after weaning). Feed intake and BW data were collected on days 0, 3, 7, 14, and 21. Fecal scores were recorded daily. On day 21, pigs were sacrificed to determine various indicators of gut health. Supplementation of the basal diet with antibiotics or DFM did not affect the overall (days 0-21) growth performance of pigs. However, antibiotics or DFM supplementation increased (P = 0.010) gain:feed (G:F) of pigs during the post-E. coli challenge period (days 3-21) by 23% and 24%, respectively. The G:F for the DFM-supplemented diet did not differ from that for the antibiotics-supplemented diet. The frequency of diarrhea for pigs fed a diet with antibiotics or DFM tended to be lower (P = 0.071) than that of pigs fed the basal diet. The jejunal villous height (VH) and the VH to crypt depth ratio (VH:CD) were increased (P < 0.001) by 33% and 35%, respectively, due to the inclusion of antibiotics in the basal diet and by 43% and 41%, respectively due to the inclusion of DFM in the basal diet. The VH and VH:CD for the DFM-supplemented diet were greater (P < 0.05) than those for the antibiotics-supplemented diet. Ileal VH was increased (P < 0.05) by 46% due to the inclusion of DFM in the basal diet. The empty weight of small intestine, cecum, or colon relative to live BW was unaffected by dietary antibiotics or DFM supplementation. In conclusion, the addition of DFM to the basal diet improved the feed efficiency of E. coli-challenged weaned pigs to a value similar to that of the antibiotics-supplemented diet and increased jejunal VH and VH:CD ratio to values greater than those for the antibiotics-supplemented diet. Thus, under E. coli challenge, the test DFM product may replace the use of antibiotics as a growth promoter in diets for weaned pigs to improve feed efficiency and gut integrity.