Chronic infection of hepatitis B virus (HBV) is one of the major causes of hepatocellular carcinoma (HCC) in the world. Hepatitis B virus X protein (HBx) has been long suspected to be involved in hepatocarcinogenesis, although its oncogenic role remains controversial. HBx is a multifunctional regulator that modulates transcription, signal transduction, cell cycle progress, protein degradation pathways, apoptosis, and genetic stability by directly or indirectly interacting with host factors. This review focuses on the biological roles of HBx in HBV replication and cellular transformation in terms of the molecular functions of HBx. Using the transient HBV replication assay, ectopically expressed HBx could stimulate HBV transcription and replication with the X-defective replicon to the level of those with the wild one. The transcription coactivation is mainly contributing to the stimulatory role of HBx on HBV replication although the other functions may affect HBV replication. Effect of HBx on cellular transformation remains controversial and was never addressed with human primary or immortal cells. Using the human immortalized primary cells, HBx was found to retain the ability to overcome active oncogene RAS-induced senescence that requires full-length HBx. At least two functions of HBx, the coactivation function and the ability to overcome oncogene-induced senescence, may be cooperatively involved in HBV-related hepatocarcinogenesis.