Introduction Synbiotics have revealed the possibility of improving constipation through gut microbiota. The synergistic efficacy of Bifidobacterium animalis subsp. lactis BL-99 (BL-99) and fructooligosaccharide (FOS) on constipation have not been investigated. Methods Loperamide-induced constipated mice model was established to explore the effect of BL-99, FOS, and BL-99+FOS on changes of defecation-related parameters, gut microbiota and metabolites. Results and discussion The results showed that BL-99, FOS, and BL-99+FOS each alleviated constipation, with the synbiotic showing significant efficacy in the first black stool defecation time, fecal number, fecal weight, and the gastrointestinal transit rate ( P < 0.05). Additionally, significant increased in serum 5-HT and IL-10 were observed in the BL-99+FOS group, alongside an increased relative abundance of Lachnospiraceae_NK4A136_group, Blautia , and Clostridium sensu stricto 1 , while significantly reducing the relative abundance of Alistipes and Bacteroides . These changes facilitated alterations in short-chain fatty acids (SCFAs) metabolism, and were closely associated with the expression of genes related to the 5-HT pathway and the modulation of serum inflammatory factors. This study provides a theoretical basis for BL-99 and FOS synbiotics to improve constipation by regulating the gut microbiota and metabolites.