Hepatocellular carcinoma (HCC) is one of the most common malignancies worldwide and the major risk factors include chronic infections with the hepatitis B (HBV) or C (HCV) virus, and exposure to dietary aflatoxin B(1) (AFB(1)) or alcohol consumption. Multiple genetic and epigenetic changes are involved in the molecular pathogenesis of HCC, for example, somatic mutations in the p53 tumor suppressor gene (TP53) and the activation of the WNT signal transduction pathway. AFB(1) frequently induces G:C to T:A transversions at the third base in codon 249 of TP53 and cooperates with HBV in causing p53 mutations in HCC. The detection of TP53 mutant DNA in plasma is a biomarker of both AFB(1) exposure and HCC risk. Chronic infection with HBV and HCV viruses, and oxyradical disorders including hemochromatosis, also generate reactive oxygen/nitrogen species that can both damage DNA and mutate cancer-related genes such as TP53. Certain mutant p53 proteins may exhibit a 'gain of oncogenic function'. The p53 biological network is a key responder to this oxidative and nitrosative stress. Depending on the extent of the DNA damage, p53 regulates the transcription of protective antioxidant genes and with extensive DNA damage, transactivates pro-oxidant genes that contribute to apoptosis. The X gene of HBV (HBx) is the most common open reading frame integrated into the host genome in HCC and the integrated HBx is frequently mutated. Mutant HBx proteins still retain their ability to bind to p53, and attenuate DNA repair and p53-mediated apoptosis. In summary, both viruses and chemicals are implicated in the etiology of TP53 mutations during the molecular pathogenesis of HCC.