BackgroundAlthough numerous studies have shown that bariatric surgery results in sustained weight loss and modifications in gut microbiota composition and cognitive function, the exact underlying mechanisms are unclear. This study aimed to investigate the effects of bariatric surgery on cognitive function through the microbiota-gut-brain axis (MGBA).MethodsDemographic data, serum samples, fecal samples, cognitive assessment scales, and resting-state functional connectivity magnetic resonance imaging (rs-fMRI) scans were obtained from 39 obese patients before and after (6 months) laparoscopic sleeve gastrectomy (LSG). PCA analysis, OPLS-DA analysis, and permutation tests were used to conduct fecal 16 S microbiota profiling, serum metabolomics, and neuroimaging analyses, and a bariatric surgery-specific rs-fMRI brain functional connectivity network was constructed. Spearman correlation analysis and Co-inertia analysis were employed to correlate significant alterations in cognitive assessment scales and resting-state functional connectivity difference networks with differential serum metabolites and 16 S microbiota data to identify key gut microbiota and serum metabolic factors.ResultsLSG significantly reduced the weight of obese patients, with reductions of up to 28%. Furthermore, cognitive assessment scale measurements revealed that LSG enhanced cognitive functions, including memory (HVLT, p = 0.000) and executive function (SCWT, p = 0.008). Also, LSG significantly altered gut microbiota composition (p = 0.001), with increased microbial abundance and diversity (p < 0.05). Moreover, serum metabolite levels were significantly altered, revealing intergroup differences in 229 metabolites mapped to 72 metabolic pathways (p < 0.05, VIP > 1). Spearman correlation analysis among cognitive assessment scales, gut microbiota species, and serum metabolites revealed correlations with 68 gut microbiota species and 138 serum metabolites (p < 0.05). Furthermore, pairwise correlations were detected between gut microbiota and serum metabolites (p < 0.05). Functional neuroimaging analysis revealed that LSG increased functional connectivity in cognitive-related frontotemporal networks (FPN, p < 0.01). Additionally, normalization of the default mode network (DMN) and salience network (SN) connectivity was observed after LSG (p < 0.001). Further canonical correlation and correlation analysis suggested that the cognitive-related brain network changes induced by LSG were associated with key gut microbiota species (Akkermansia, Blautia, Collinsella, Phascolarctobacterium, and Ruminococcus, p < 0.05) and neuroactive metabolites (Glycine, L-Serine, DL-Dopa, SM (d18:1/24:1(15Z), p < 0.05).ConclusionThese findings indicate the pathophysiological role of the microbiota-gut-brain axis in enhancing cognitive function after bariatric surgery, and the study provides a basis for clinical dietary adjustments, probiotic supplementation, and guidance for bariatric surgery, but further research is still needed.Trial registrationChinese Clinical Trial Registry, ChiCTR2100049403. Registered 02 August 2021, https://www.chictr.org.cn/.