Coffee consumption is globally widespread and has become a lifestyle habit. This study investigated coffee consumption and liver-related survival in a large cohort of 455,870 individuals with UK biobank, categorized into without steatosis, metabolic dysfunction-associated steatotic liver disease (MASLD), and MASLD and increased alcohol intake (MetALD). Inverse probability of treatment weighting (IPTW) adjusted for confounding variables was used, followed by Kaplan–Meier analysis. Moderate coffee consumption (1–2 cups per day) was associated with lower all-cause mortality across the entire cohort, without the steatosis, MASLD (p < 0.0001), and MetALD cohorts (p = 0.0047 for pre-IPTW, p = 0.027 for post-IPTW). Before IPTW adjustment, consuming one or more cups of coffee per day appeared to significantly reduce liver-related mortality in the overall (p = 0.015) and MASLD cohorts (p = 0.011). However, post-IPTW application, no significant differences in liver-related mortality were observed between the coffee intake groups (p = 0.778, 0.319, 0.564, 0.238 for each group). While increased coffee consumption initially seemed to reduce liver-related mortality, after IPTW adjustment, only all-cause mortality significantly decreased (p < 0.0001 and p = 0.027). These findings suggest that previous studies might have overestimated the favorable effect of coffee intake on chronic liver disease due to confounding factors.