Observational studies have shown an association between liver dysfunction and hepatocellular carcinoma (HCC), but the causality relationship between them is unclear. We aimed to determine whether there is a bidirectional causal relationship between liver function indicators (alanine aminotransferase, ALT; aspartate aminotransferase, AST; alkaline phosphatase, ALP; γ-glutamyltransferase, GGT) and HCC. Our two-sample Mendelian randomization (MR) study acquired single nucleotide polymorphisms (SNPs) associated with liver function indicators (ALT, n = 134,182; AST, n = 134,154; GGT, n = 118,309; ALP, n = 105,030) and with HCC (n = 197,611) from publicly available genome-wide association studies (GWAS) of East Asian ancestry in Japan (BioBank Japan, BBJ). Univariable MR analyses were performed to identify whether the genetic evidence of exposure was significantly associated with outcome. Multivariable MR analysis was conducted to estimate the independent effects of exposures on outcome. Univariable MR analysis indicated that the level of ALT, AST, and GGT was the risk factor for HCC incidence. Meanwhile, multivariable MR analysis revealed that AST was an independent risk factor for HCC. The hazard ratio (HR) of the probability of HCC was 3.045 [95% confidence interval (95%CI), 1.697–5.463, p = 0.003] for AST. The results of reverse MR analyses showed that gene-predictive HCC incidence could increase the levels of AST (HR = 1.031, 95%CI: 1.009–1.054, p = 2.52 × 10−4) and ALT (HR = 1.040, 95%CI: 1.019–1.063, p = 0.005). Meanwhile, HCC may be negatively correlated with ALP levels (HR = 0.971, 95%CI: 0.947–0.995, p = 0.018). This study provides evidence to support that genetically predicted higher levels of AST are related to increased risk of HCC, with no strong evidence of a causal effect of genetically predicted ALP, ALP, and GGT on HCC. In addition, genetic predisposition to HCC could influence blood concentration of ALT, AST, and ALP. Thus, this may create a vicious cycle.