Inflammatory bowel disease (IBD) is a chronic condition characterized by periods of spontaneous intestinal inflammation and is increasing in industrialized populations. Combined with host genetic predisposition, diet and gut bacteria are thought to be prominent features contributing to IBD, but little is known about the precise mechanisms involved. Here, we show that low dietary fiber promotes bacterial erosion of protective colonic mucus, leading to lethal colitis in mice lacking the IBD-associated cytokine, interleukin-10. Diet-induced inflammation is driven by mucin-degrading bacteria-mediated Th1 immune responses and is preceded by expansion of natural killer T cells and reduced immunoglobulin A coating of some bacteria. Surprisingly, an exclusive enteral nutrition diet, also lacking dietary fiber, reduced disease by increasing bacterial production of isobutyrate, which was dependent on the presence of a specific bacterial species, Eubacterium rectale. Our results illuminate a mechanistic framework using gnotobiotic mice to unravel the complex web of diet, host and microbial factors that influence IBD.