phthalate (DEHP) plasticizer, a well-known environmental and food pollutant, has neurotoxicity. However, it is unknown whether DEHP leads to learning and memory impairment through gut−brain axis and whether Clostridium butyricum can alleviate this impairment. Here, C57BL/6 mice were exposed to DEHP and treated with C. butyricum. Learning and memory abilities were evaluated through the Morris water maze. The levels of synaptic proteins, inflammatory cytokines, and 5hydroxytryptamine (5-HT) were detected by immunohistochemistry or ELISA. Gut microbiota were analyzed through 16S rRNA sequencing. C. butyricum alleviated DEHP-induced learning and memory impairment and restored synaptic proteins. It significantly relieved DEHP-induced inflammation and recovered 5-HT levels. C. butyricum recovered the richness of the gut microbiota decreased by DEHP, with the Bif idobacterium genus increasing the most. Overall, C. butyricum alleviated DEHP-induced learning and memory impairment due to reduced inflammation and increased 5-HT secretion, which was partly attributed to the recovery of gut microbiota.