Obesity is a global health concern and independent risk factor for cancers including hepatocellular carcinoma (HCC). However, evidence on the causal links between obesity and HCC is limited and inconclusive. This study aimed to investigate the causal relationship between obesity-related traits and HCC risk and explore underlying mechanisms using bioinformatics approaches. Two-sample Mendelian randomization analysis was conducted leveraging publicly available genome-wide association study summary data on obesity traits (body mass index, body fat percentage, waist circumference, waist-to-hip ratio, visceral adipose tissue volume) and HCC. Associations of obesity with primary mechanisms (insulin resistance, adipokines, inflammation) and their effects on HCC were examined. Differentially expressed genes in obesity and HCC were identified and functional enrichment analyses were performed. Correlations with tumor microenvironment (TME) and immunotherapy markers were analyzed. Genetically predicted higher body mass index and body fat percentage showed significant causal relationships with increased HCC risk. Overall obesity also demonstrated causal links with insulin resistance, circulating leptin levels, C-reactive protein levels and risk of severe insulin resistant type 2 diabetes. Four differentially expressed genes (ESR1, GCDH, FAHD2A, DCXR) were common in obesity and HCC. Enrichment analyses indicated their roles in processes like RNA capping, viral transcription, IL-17 signaling and endocrine resistance. They exhibited negative correlations with immune cell infiltration and immunotherapy markers in HCC. Overall obesity likely has a causal effect on HCC risk in Europeans, possibly via influencing primary mechanisms. The identified differentially expressed genes may be implicated in obesity-induced hepatocarcinogenesis through regulating cell cycle, inflammation and immune evasion. Further research on precise mechanisms is warranted.