•FMT attenuates cognitive deficits in Fmr1 KO mice•FMT ameliorates social novelty preference•↓A. muciniphila in Fmr1 KO mice•A. muciniphila reduces TNF-α in the cortex and hippocampus•FMT normalized the increased expression level of Iba1. The gene discussed is FMR1; the disease is Cognitive impairment.