Few single nucleotide polymorphisms (SNPs) have been reproducibly associated with hepatocellular carcinoma (HCC). Our aim was to test the association between nine SNPs and HCC occurrence. SNPs in genes linked to HCC (DEPDC5, GRIK1, KIF1B, STAT4, MICA, DLC1, DDX18) or to liver damage (PNPLA3‐rs738409, TM6SF2‐rs58542926) in GWAS were genotyped in discovery cohorts including 1,020 HCC, 2,021 controls with chronic liver disease and 2,484 healthy individuals and replication was performed in prospective cohorts of cirrhotic patients with alcoholic liver disease (ALD, n = 249) and hepatitis C (n = 268). In the discovery cohort, PNPLA3 and TM6SF2 SNPs were associated with HCC (OR = 1.67 [CI95%:1.16–2.40], p = 0.005; OR = 1.45 [CI95%:1.08–1.94], p = 0.01) after adjustment for fibrosis, age, gender and etiology. In contrast, STAT4‐rs7574865 was associated with HCC only in HBV infected patients (p = 0.03) and the other tested SNP were not linked with HCC risk. PNPLA3 and TM6SF2 variants were independently associated with HCC in patients with ALD (OR = 3.91 [CI95%:2.52–6.06], p = 1.14E‐09; OR = 1.79 [CI95%:1.25–2.56], p = 0.001) but not with other etiologies. PNPLA3 SNP was also significantly associated with HCC developed on a nonfibrotic liver (OR = 2.19 [CI95%:1.22–3.92], p = 0.007). The association of PNPLA3 and TM6SF2 with HCC risk was confirmed in the prospective cohort with ALD. A genetic score including PNPLA3 and TM6SF2 minor alleles showed a progressive significant increased risk of HCC in ALD patients. In conclusion, PNPLA3‐rs738409 and TM6SF2‐rs58542926 are inherited risk variants of HCC development in patients with ALD in a dose dependent manner. The link between PNPLA3 and HCC on nonfibrotic liver suggests a direct role in liver carcinogenesis.