BackgroundAlterations in gut microbiota composition and function have been linked to the development and progression of thyroid cancer (TC). However, the exact nature of the causal relationship between them remains uncertain.MethodsA bidirectional two-sample Mendelian randomization (TSMR) analysis was conducted to assess the causal connection between gut microbiota (18,340 individuals) and TC (6,699 cases combined with 1,613,655 controls) using data from a genome-wide association study (GWAS). The primary analysis used the inverse-variance weighted (IVW) method to estimate the causal effect, with supplementary approaches including the weighted median, weighted mode, simple mode, and MR-Egger. Heterogeneity and pleiotropy were assessed using the Cochrane Q test, MR-Egger intercept test, and MR-PRESSO global test. A reverse TSMR analysis was performed to explore reverse causality.ResultsThis study identified seven microbial taxa with significant associations with TC. Specifically, the genus Butyrivibrio (OR: 1.127, 95% CI: 1.008-1.260, p = 0.036), Fusicatenibacter (OR: 1.313, 95% CI: 1.066-1.618, p = 0.011), Oscillospira (OR: 1.240, 95% CI: 1.001-1.536, p = 0.049), Ruminococcus2 (OR: 1.408, 95% CI: 1.158-1.711, p < 0.001), Terrisporobacter (OR: 1.241, 95% CI: 1.018-1.513, p = 0.032) were identified as risk factors for TC, while The genus Olsenella (OR: 0.882, 95% CI: 0.787-0.989, p = 0.031) and Ruminococcaceae UCG004 (OR: 0.719, 95% CI: 0.566-0.914, p = 0.007) were associated with reduced TC risk. The reverse MR analysis found no evidence of reverse causality and suggested that TC may lead to increased levels of the genus Holdemanella (β: 0.053, 95% CI: 0.012~0.094, p = 0.011) and decreased levels of the order Bacillales (β: -0.075, 95% CI: -0.143~-0.006, p = 0.033). No significant bias, heterogeneity, or pleiotropy was detected in this study.ConclusionThis study suggests a potential causal relationship between gut microbiota and TC, providing new insights into the role of gut microbiota in TC. Further research is needed to explore the underlying biological mechanisms.