Diet and lifestyle are crucial factors that influence the susceptibility of humans to nonalcoholic fatty liver disease (NAFLD). Personalized diet patterns chronically affect the composition and activity of microbiota in the human gut; consequently, nutrition-related dysbiosis exacerbates NAFLD via the gut–liver axis. Recent advances in diagnostic technology for gut microbes and microbiota-derived metabolites have led to advances in the diagnosis, treatment, and prognosis of NAFLD. Microbiota-derived metabolites, including tryptophan, short-chain fatty acid, fat, fructose, or bile acid, regulate the pathophysiology of NAFLD. The microbiota metabolize nutrients, and metabolites are closely related to the development of NAFLD. In this review, we discuss the influence of nutrients, gut microbes, their corresponding metabolites, and metabolism in the pathogenesis of NAFLD.