Background and Aim: Immune-related liver injury (liver-irAE) is a clinical problem with a potentially poor prognosis. Methods: We retrospectively collected clinical data from patients treated with immune checkpoint inhibitors between September 2014 and December 2021 at the Nagoya University Hospital. Using an unsupervised machine learning method, the Gaussian mixture model, to divide the cohort into clusters based on inflammatory markers, we investigated the cumulative incidence of liver-irAEs in these clusters.Results: This study included a total of 702 patients. Among them, 492 (70.1%) patients were male, and the mean age was 66.6 years. During the mean follow-up period of 423 days, severe liver-irAEs (Common Terminology Criteria for Adverse Events grade ≥ 3) occurred in 43 patients. Patients were divided into five clusters (a, b, c, d, and e). The cumulative incidence of liver-irAE was higher in cluster c than in cluster a (hazard ratio [HR]: 13.59, 95% confidence interval [CI]: 1.70-108.76, P = 0.014), and overall survival was worse in clusters c and d than in cluster a (HR: 2.83, 95% CI: 1.77-4.50, P < 0.001; HR: 2.87, 95% CI: 1.47-5.60, P = 0.002, respectively). Clusters c and d were characterized by high temperature, C-reactive protein, platelets, and low albumin. However, there were differences in the prevalence of neutrophil count, neutrophil-tolymphocyte ratio, and liver metastases between both clusters. Conclusions: The combined assessment of multiple markers and body temperature may help stratify high-risk groups for developing liver-irAE.