Preterm infants often exhibit gut dysbiosis and neurodevelopmental impairments, with evidence suggesting a crucial role of the microbiota-gut-brain axis in early development. To investigate whether probiotic intervention could improve these outcomes, we examined the effects of Clostridium butyricum and Bifidobacterium (LCBBCP) on gut microbiota diversity, spatial memory, and anxiety in preterm mice. We established a preterm mouse model divided into three groups: preterm + LCBBCP group, preterm control, and full-term control (n = 21 each). The preterm + LCBBCP group received LCBBCP oral gavage, while controls received saline. Gut microbiota analysis through 16 S rRNA gene sequencing revealed higher richness and evenness at postnatal day 21(P21) than postnatal day 14 (P14) across all groups, with preterm controls showing significantly lower microbial diversity at P14 compared to full-term controls. The preterm control group exhibited elevated levels of Enterobacteriaceae (37.586), Ruminococcaceae (1.7599), Streptococcaceae (1.0437), and Gemellaceae (0.3002) at P14, while Lactobacillaceae levels were higher in full-term control (13.7202 at P14 and 4.1571 at P21) and preterm + LCBBCP group (21.0084 at P14 and 10.9367 at P21) at both timepoints. Behavioral tests showed that preterm + LCBBCP group mice performed better than preterm controls in spatial memory tasks and displayed reduced anxiety-like behaviors, although not reaching full-term control levels. The preterm control group showed significantly reduced movement, slower speed, and increased resting time in open field tests. These findings demonstrate that LCBBCP intervention enhanced microbial diversity, improved spatial learning, and alleviated anxiety-like behaviors in preterm mice, likely through reducing Enterobacteriaceae and promoting Lactobacillaceae, suggesting a potential therapeutic strategy for preterm-related complications.