The effect of feeding C57BL/6 mice white button (WB) mushrooms or control (CTRL) diets for 6 wk was determined on the bacterial microflora, urinary metabolome, and resistance to a gastrointestinal (GI) pathogen. Feeding mice a diet containing 1 g WB mushrooms/100 g diet resulted in changes in the microflora that were evident at 2 wk and stabilized after 4 wk of WB feeding. Compared with CTRL-fed mice, WB feeding (1 g/100 g diet) increased the diversity of the microflora and reduced potentially pathogenic (e.g., Clostridia) bacteria in the GI tract. Bacteria from the Bacteroidetes phylum increased and the Firmicutes phylum decreased in mushroom-fed mice compared with CTRL. The changes in the microflora were also reflected in the urinary metabolome that showed a metabolic shift in the WB-fed compared with the CTRL-fed mice. The WB feeding and changes in the microbiome were associated with fewer inflammatory cells and decreased colitis severity in the GI mucosa following Citrobacter rodentium infection compared with CTRL. Paradoxically, the clearance of C. rodentium infection did not differ even though Ifn-γ and Il-17 were higher in the colons of the WB-fed mice compared with CTRL. Adding modest amounts of WB mushrooms (1 g/100 g diet) to the diet changed the composition of the normal flora and the urinary metabolome of mice and these changes resulted in better control of inflammation and resolution of infection with C. rodentium.