Liver cancer is closely linked to chronic inflammation. While observational studies have reported positive associations between extrahepatic immune-mediated diseases and systemic inflammatory biomarkers and liver cancer, the genetic association between these inflammatory traits and liver cancer remains elusive and merits further investigation. We conducted a two-sample Mendelian randomization (MR) analysis, using inflammatory traits as exposures and liver cancer as the outcome. The genetic summary data of both exposures and outcome were retrieved from previous genome-wide association studies (GWAS). Four MR methods, including inverse-variance-weighted (IVW), MR-Egger regression, weighted-median, and weighted-mode methods, were employed to examine the genetic association between inflammatory traits and liver cancer. Nine extrahepatic immune-mediated diseases, seven circulating inflammatory biomarkers, and 187 inflammatory cytokines were analyzed in this study. The IVW method suggested that none of the nine immune-mediated diseases were associated with the risk of liver cancer, with odds ratios of 1.08 (95% CI 0.87–1.35) for asthma, 0.98 (95% CI 0.91–1.06) for rheumatoid arthritis, 1.01 (95% CI 0.96–1.07) for type 1 diabetes, 1.01 (95% CI 0.98–1.03) for psoriasis, 0.98 (95% CI 0.89–1.08) for Crohn’s disease, 1.02 (95% CI 0.91–1.13) for ulcerative colitis, 0.91 (95% CI 0.74–1.11) for celiac disease, 0.93 (95% CI 0.84–1.05) for multiple sclerosis, and 1.05 (95% CI 0.97–1.13) for systemic lupus erythematosus. Similarly, no significant association was found between circulating inflammatory biomarkers and cytokines and liver cancer after correcting for multiple testing. The findings were consistent across all four MR methods used in this study. Our findings do not support a genetic association between extrahepatic inflammatory traits and liver cancer. However, larger-scale GWAS summary data and more genetic instruments are needed to confirm these findings.