A common loss-of-function variant in HSD17B13 (rs72613567:TA) was recently found to protect from chronic liver disease. Whether the variant confers protection from specific risk factors for liver disease is unclear. We tested the association of rs72613567 with plasma levels of alanine transaminase (ALT) and clinical liver disease and mortality in 111,612 individuals from the Danish general population, including 497 with cirrhosis and 113 with hepatocellular carcinoma. HSD17B13 rs72613567:TA was associated with stepwise lower levels of plasma ALT of up to 1.3 U/L in TA/TA homozygotes versus T/T homozygotes. For each TA-allele, the risk of cirrhosis and hepatocellular carcinoma was reduced by 15% and 28%, respectively. In prospective analyses, the TA-allele was associated with up to 33% lower rates of liver-related mortality in the general population, and with up to 49% reduced liver-related mortality in patients with cirrhosis. The ALT-lowering effect of rs72613567:TA was amplified by increasing adiposity, alcohol consumption, and genetic risk of fatty liver disease. The TA-allele was associated with only marginally lower ALT in lean nondrinkers with low genetic risk of hepatic steatosis. In contrast, compared with T/T homozygotes, TA/TA homozygotes had 12% to 18% lower plasma ALT among the most obese, in heavy drinkers, and in individuals carrying three or four steatogenic alleles in patatin-like phospholipase domain-containing protein 3 (PNPLA3) and transmembrane 6 superfamily 2 (TM6SF2). Conclusion: High risk of fatty liver disease amplifies the ALT-lowering effect of HSD17B13 rs72613567:TA in the Danish general population.