With changes in modern lifestyles, type 2 diabetes mellitus (T2DM) has become a global epidemic metabolic disease, and hepatocellular carcinoma (HCC) is one of the leading causes of cancer-related deaths worldwide. T2DM is a complex metabolic disorder and has been considered an independent risk factor for HCC. Growing evidence supports that T2DM-related risk factors facilitate hepatocarcinogenesis via abundant mechanisms. With the wide implementation of microbiomics, transcriptomics, and immunotherapy, the understanding of the complex mechanisms of intestinal flora and immune cell subsets have advanced tremendously in T2DM-related HCC, uncovering new findings in T2DM-related HCC patients. In addition, reports have indicated the different effects of anti-DM drugs on the progression of HCC. In this review, we summarize the effects of major T2DM-related risk factors (including hyperglycemia, hyperinsulinemia, insulin, chronic inflammation, obesity, nonalcoholic fatty liver disease, gut microbiota and immunomodulation), and anti-DM drugs on the carcinogensis and progression of HCC, as well as their potential molecular mechanisms. In addition, other factors (miRNAs, genes, and lifestyle) related to T2DM-related HCC are discussed. We propose a refined concept by which T2DM-related risk factors and anti-DM drugs contribute to HCC and discuss research directions prompted by such evidence worth pursuing in the coming years. Finally, we put forward novel therapeutic approaches to improve the prognosis of T2DM-related HCC, including exploiting novel diagnostic biomarkers, combination therapy with immunocheckpoint inhibitors, and enhancement of the standardized management of T2DM patients.