Hepatitis B virus (HBV)-induced liver necrosis takes great part in liver cirrhosis progression. However, less is known about whether hepatitis B virus X protein (HBx) has effect on liver fibrosis. Here, we report that HBV leads to liver fibrosis and hepatocarcinogenesis through miR-30e targeting P4HA2. HBV transgenic mouse was treated by CCl4 to generate a model of liver fibrosis. A crucial enzyme catalyzing collagen formation, prolyl 4-hydroxylase subunit α2 (P4HA2) was evaluated by immunohistochemistry, western blotting or quantitative reverse transcription-PCR analysis. The function of HBV-modulated P4HA2 in hepatoma cell growth in vitro and in vivo was analyzed by EdU, MTT, colony-forming assay and animal transplantation assay. HBV transgenic mice exhibited more collagen deposition in liver after intraperitoneal injection of CCl4. P4HA2 was dramatically augmented in liver samples of HBV transgenic mice, clinical liver cirrhosis and liver cancer patients. Mechanistically, HBx was capable of inducing P4HA2 through suppressing miR-30e, in which miR-30e could target P4HA2 mRNA 3′ untranslated region in liver cancer cells. HBx inhibited the miR-30e expression through increasing methylation of CpG islands in its promoter mediated by EZH2-formed complexes. Functionally, HBx-elevated P4HA2 enhanced the collagen deposition in the liver in vivo and in vitro, leading to liver fibrosis and liver cancer progression. In conclusion, HBx promotes the development of liver fibrosis and hepatocellular carcinoma through miR-30e targeting P4HA2 mRNA. We provide novel perspective on how HBx induces liver fibrosis.