BackgroundObservational studies have hinted at a correlation between the gut microbiota and spinal pain (SP). However, the impact of the gut microbiota on SP remains inconclusive.MethodsIn this study, we employed a two-sample Mendelian randomization (MR) analysis to explore the causal relationship between the gut microbiota and SP, encompassing neck pain (NP), thoracic spine pain (TSP), low back pain (LBP), and back pain (BP). The compiled gut microbiota data originated from a genome-wide association study (GWAS) conducted by the MiBioGen consortium (n = 18,340). Summary data for NP were sourced from the UK Biobank, TSP from the FinnGen Biobank, and LBP from both the UK Biobank and FinnGen Biobank. Summary data for BP were obtained from the UK Biobank. The primary analytical approach for assessing causal relationships was the Inverse Variance Weighted (IVW) method, supplemented by various sensitivity analyses to ensure result robustness.ResultsThe IVW analysis unveiled 37 bacterial genera with a potential causal relationship to SP. After Benjamini-Hochberg corrected test, four bacterial genera emerged with a strong causal relationship to SP. Specifically, Oxalobacter (OR: 1.143, 95% CI 1.061–1.232, P = 0.0004) and Tyzzerella 3 (OR: 1.145, 95% CI 1.059–1.238, P = 0.0007) were identified as risk factors for LBP, while Ruminococcaceae UCG011 (OR: 0.859, 95% CI 0.791–0.932, P = 0.0003) was marked as a protective factor for LBP, and Olsenella (OR: 0.893, 95% CI 0.839–0.951, P = 0.0004) was recognized as a protective factor for low back pain or/and sciatica. No significant heterogeneity or horizontal pleiotropy was observed through alternative testing methods.ConclusionThis study establishes a causal relationship between the gut microbiota and SP, shedding light on the “gut-spine” axis. These findings offer novel perspectives for understanding the etiology of SP and provide a theoretical foundation for potential interventions targeting the gut microbiota to prevent and treat SP.