Hepatocellular carcinoma (HCC) is the fifth most common cancer, but the third leading cause of cancer death, in the world, with more than 500,000 fatalities annually. The major etiology of HCC/liver cancer in people is hepatitis B virus (HBV), followed by hepatitis C virus infection (HCV), although nonviral causes also play a role in a minority of cases. Recent molecular studies confirm what was suspected: that HCC tissue from different individuals have many phenotypic differences. However, there are clearly features that unify HCC occurring in a background of viral hepatitis B and C. HCC due to HBV and HCV may be an indirect result of enhanced hepatocyte turnover that occurs in an effort to replace infected cells that have been immunologically attacked. Viral functions may also play a more direct role in mediating oncogenesis. This review considers the molecular and cellular mechanisms involved in primary hepatocellular carcinoma, using a viral perspective.