Non-alcoholic fatty liver disease (NAFLD) is rapidly becoming the most common liver disease worldwide, yet the pathogenesis of NAFLD is only partially understood. Here, we investigated the role of the gut bacteria in NAFLD by stimulating the gut bacteria via feeding mice the fermentable dietary fiber guar gum and suppressing the gut bacteria via chronic oral administration of antibiotics. Guar gum feeding profoundly altered the gut microbiota composition, in parallel with reduced diet-induced obesity and improved glucose tolerance. Strikingly, despite reducing adipose tissue mass and inflammation, guar gum enhanced hepatic inflammation and fibrosis, concurrent with markedly elevated plasma and hepatic bile acid levels. Consistent with a role of elevated bile acids in the liver phenotype, treatment of mice with taurocholic acid stimulated hepatic inflammation and fibrosis. In contrast to guar gum, chronic oral administration of antibiotics effectively suppressed the gut bacteria, decreased portal secondary bile acid levels, and attenuated hepatic inflammation and fibrosis. Neither guar gum or antibiotics influenced plasma lipopolysaccharide levels. In conclusion, our data indicate a causal link between changes in gut microbiota and hepatic inflammation and fibrosis in a mouse model of NAFLD, possibly via alterations in bile acids.