Type 2 diabetes mellitus is a widespread disease worldwide, and is one of the cornerstones of metabolic syndrome. The existence of a strong relationship between diabetes and the progression of liver fibrosis has been demonstrated by several studies, using invasive and noninvasive techniques. Patients with type 2 diabetes mellitus (T2DM) and nonalcoholic fatty liver disease (NAFLD) show faster progression of fibrosis than patients without diabetes. Many confounding factors make it difficult to determine the exact mechanisms involved. What we know so far is that both liver fibrosis and T2DM are expressions of metabolic dysfunction, and we recognize similar risk factors. Interestingly, both are promoted by metabolic endotoxemia, a low-grade inflammatory condition caused by increased endotoxin levels and linked to intestinal dysbiosis and increased intestinal permeability. There is broad evidence on the role of the gut microbiota in the progression of liver disease, through both metabolic and inflammatory mechanisms. Therefore, dysbiosis that is associated with diabetes can act as a modifier of the natural evolution of NAFLD. In addition to diet, hypoglycemic drugs play an important role in this scenario, and their benefit is also the result of effects exerted in the gut. Here, we provide an overview of the mechanisms that explain why diabetic patients show a more rapid progression of liver disease up to hepatocellular carcinoma (HCC), focusing especially on those involving the gut–liver axis.