BackgroundSubstantial research evidence supports the correlation between mental disorders and sepsis. Nevertheless, the causal connection between a particular psychological disorder and sepsis remains unclear.MethodsFor investigating the causal relationships between mental disorders and sepsis, genetic variants correlated with mental disorders, including anorexia nervosa (AN), attention-deficit hyperactivity disorder (ADHD), autism spectrum disorder (ASD), bipolar disorder (BD), major depressive disorder (MDD), obsessive-compulsive disorder (OCD), panic disorder (PD), posttraumatic stress disorder (PTSD), schizophrenia (SCZ), and tourette syndrome (TS), were all extracted from the Psychiatric Genomics Consortium (PGC). The causal estimates and direction between these mental disorders and sepsis were evaluated employing a two-sample bidirectional MR strategy. The inverse variance weighted (IVW) method was the primary approach utilized. Various sensitivity analyses were performed to confirm the validity of the causal effect. Meta-analysis, multivariable MR, and mediation MR were conducted to ensure the credibility and depth of this research.ResultsThe presence of AN was in relation to a greater likelihood of sepsis (OR 1.08, 95% CI 1.02–1.14; p = 0.013). A meta-analysis including validation cohorts supported this observation (OR 1.06, 95% CI 1.02–1.09). None of the investigated mental disorders appeared to be impacted when sepsis was set as the exposure factor. Even after adjusting for confounding factors, AN remained statistically significant (OR 1.08, 95% CI 1.02–1.15; p = 0.013). Mediation analysis indicated N-formylmethionine levels (with a mediated proportion of 7.47%), cystatin D levels (2.97%), ketogluconate Metabolism (17.41%) and N10-formyl-tetrahydrofolate biosynthesis (20.06%) might serve as mediators in the pathogenesis of AN-sepsis.ConclusionAt the gene prediction level, two-sample bidirectional MR analysis revealed that mental disorder AN had a causal association with an increased likelihood of sepsis. In addition, N-formylmethionine levels, cystatin D levels, ketogluconate metabolism and N10-formyl-tetrahydrofolate biosynthesis may function as potential mediators in the pathophysiology of AN-sepsis. Our research may contribute to the investigation of novel therapeutic strategies for mental illness and sepsis.