Treatment with immune checkpoint inhibitors (ICIs) is steadily becoming the standard of care for hepatocellular carcinoma (HCC), with an increasing number of immune-related adverse events (irAEs). However, only a small number of reports on the occurrence of diabetes mellitus (DM) in patients with HCC treated with ICIs have been published. In the present study, the clinical manifestations, laboratory findings, treatment and prognosis of three patients with advanced HCC were reported, who suffered immune-related DM when receiving treatment with ICIs. Furthermore, the relevant literature was reviewed in order to summarize clinical manifestations, possible mechanisms, diagnosis, prognosis of rechallenge and recommended management options, as well as clinical treatment suggestions. ICI-induced diabetes is rare but irAEs are potentially fatal, as diabetic ketoacidosis (DKA) is often the first manifestation. The incidence of immune-related DM is 0.86% and among those cases, the incidence of DKA is 59%. The combination of two ICIs markedly increases the risk. The human leukocyte antigen genotype, islet autoantibodies and autoreactive T cell-mediated β-cell destruction may be linked to the occurrence of immune-related DM. Patient education and clinicians' awareness of ICI-related DM are good management options. Adequate clinical judgment, close monitoring and early detection are also needed to decide whether to continue immunotherapy or to rechallenge it, so as to achieve the maximum benefit of clinical treatment.