We propose using Mendelian randomization analysis on GWAS data and MetaboAnalyst to model gut microbiota, metabolic pathways, blood metabolites, and cancer risk. We examined 473 gut microbiota, 205 pathways, 1400 metabolites, and 8 cancers. Results were validated through bidirectional two-sample Mendelian Randomization (MR), heterogeneity tests, and pathway enrichment, leading to a mediation pathway model. We identified 129 gut microbiota, 57 pathways, and 463 metabolites linked to cancer, and 34 significant plasma pathways. 15 microbiota, 8 pathways, and 58 metabolites implicated in multiple cancers. Eight plasma metabolic pathways are involved in the development of multiple types of cancer. Through Multivariate Mendelian Randomization (MVMR) and mediation analysis, we found 9 mediation pathways, offering novel targets and research directions for cancer pathogenesis and treatment.