Gut microbiota dysregulation plays a key role in the pathogenesis of nonalcoholic fatty liver disease (NAFLD) through its metabolites. Therefore, the restoration of the gut microbiota and supplementation with commensal bacterial metabolites can be of therapeutic benefit against the disease. In this review, we summarize the roles of various bacterial metabolites in the pathogenesis of NAFLD and their therapeutic implications. The gut microbiota dysregulation is a feature of NAFLD, and the signatures of gut microbiota are associated with the severity of the disease through altered bacterial metabolites. Disturbance of bile acid metabolism leads to underactivation of bile acid receptors FXR and TGR5, causal for decreased energy expenditure, increased lipogenesis, increased bile acid synthesis and increased macrophage activity. Decreased production of butyrate results in increased intestinal inflammation, increased gut permeability, endotoxemia and systemic inflammation. Dysregulation of amino acids and choline also contributes to lipid accumulation and to a chronic inflammatory status. In some NAFLD patients, overproduction of ethanol produced by bacteria is responsible for hepatic inflammation. Many approaches including probiotics, prebiotics, synbiotics, faecal microbiome transplantation and a fasting-mimicking diet have been applied to restore the gut microbiota for the improvement of NAFLD.