Recently, a loss of function variant (rs72613567) in 17‐beta‐hydroxysteroid dehydrogenase 13 (HSD17B13) has been identified as protective of nonalcoholic (NAFLD) and alcoholic liver disease (ALD). However, the role of this single‐nucleotide polymorphism (SNP) in the development of hepatocellular carcinoma (HCC) is currently unknown. A total of 3,315 European patients with HCC (n = 1,109) or without HCC, but with chronic liver disease (CLD; n = 2,206), from four centers were analyzed either by whole‐exome sequencing (WES; exploratory cohort, 285 HCC) or genotyped for HSD17B13 rs72613567 (validation cohort, 824 HCC and all CLD). We included a control group of 33,337 healthy European individuals from the Exome Aggregation Consortium. We compared distribution of genotype using the chi‐square test and logistic regression. In the exploratory cohort analyzed by WES, frequency of the TA allele of HSD17B13 rs72613567 was significantly decreased in HCC patients compared to healthy controls (P = 1.52 × 10−06). In the validation cohort, frequency of TA allele carriers was also decreased in patients with CLD and without HCC (39%) compared to healthy individuals (47%; P < 0.0001). The protective effect of the TA allele of HSD17B13 rs72613567 was identified in patients with ALD (odds ratio [OR] = 0.73; 95% confidence interval [CI], 0.65‐0.82; P < 0.0001), NAFLD (OR = 0.64; 95% CI, 0.49‐0.83; P = 0.0007), and hepatitis C (OR = 0.71; 95% CI, 0.60‐0.85; P = 0.0002). In patients with ALD, the proportion of TA allele carriers with HCC was significantly lower (32%) than in CLD patients without HCC (40%), even after adjustment for age, sex, and fibrosis (OR = 0.64; 95% CI, 0.46‐0.87; P = 0.005). Conclusion: The HSD17B13 rs72613567 loss of function variant is protective of HCC development in patients with ALD.