Abstract Background Digestive tract cancers account for a significant proportion of the global cancer burden, and their prevention and treat
Abstract Background Digestive tract cancers account for a significant proportion of the global cancer burden, and their prevention and treatment pose a worldwide challenge. Metformin, as a first-line treatment for diabetes, offers advantages such as high safety and affordability. Previous research has suggested that the use of metformin may reduce the risk of cancers, but there is still a lack of strong evidence regarding its causal relationship with digestive tract cancers. Methods We employed Mendelian randomization (MR) analysis to investigate the causal relationships between metformin use and various digestive tract cancers. We selected single nucleotide polymorphisms (SNPs) related to the Adenosine 5′-monophosphate (AMP)-activated protein kinase (AMPK), which is associated with the action of metformin, as instrumental variables. The inverse variance-weighted method (IVW) was the most important method. Cochran's Q was used to detect heterogeneity, and the MR-PRESSO test and MR-Egger regression were used to detect horizontal pleiotropy. Subsequently, we verified the toxicity and proliferation inhibition of metformin on Huh 7 and PLC in hepatocellular carcinoma cells. Results IVW results showed that metformin use reduced the risk of liver and bile duct cancers (OR = 0.994, 95% CI 0.990–0.999; P = 0.008), but there were no causal relationships with other digestive tract cancers. Our cell experiments have confirmed this point. Conclusion Metformin may be used for the prevention or treatment of liver and bile duct cancers.