Hepatocellular carcinoma (HCC) is the third leading cause of cancer-related death worldwide. We sequenced and analyzed the whole genomes of 27 HCCs, 25 of which were associated with hepatitis B or C virus infections, including two sets of multicentric tumors. Although no common somatic mutations were identified in the multicentric tumor pairs, their whole-genome substitution patterns were similar, suggesting that these tumors developed from independent mutations, although their shared etiological backgrounds may have strongly influenced their somatic mutation patterns. Statistical and functional analyses yielded a list of recurrently mutated genes. Multiple chromatin regulators, including ARID1A, ARID1B, ARID2, MLL and MLL3, were mutated in ∼50% of the tumors. Hepatitis B virus genome integration in the TERT locus was frequently observed in a high clonal proportion. Our whole-genome sequencing analysis of HCCs identified the influence of etiological background on somatic mutation patterns and subsequent carcinogenesis, as well as recurrent mutations in chromatin regulators in HCCs.