Sepsis causes high mortality in intensive care units. Although there have been many studies on the gut microbiota in patients with sepsis, the impact of sepsis on the gut microbiota has not been directly determined because the treatment of sepsis also affects the gut microbiota. Therefore, we designed this animal experiment to explore gut microbiota alterations during sepsis. Mice were divided into two groups, mice that survived less than 3 days and mice that survived more than 3 days. Fecal samples collected on the day of cecal ligation and puncture (CLP), as well as on the 3rd and 7th days after CLP, were subjected to microbial community analysis and nontargeted metabolomics analysis. The results showed significantly lower bacterial diversity in fecal samples after CLP. At the genus level, the fecal samples obtained on the 3rd and 7th days after CLP exhibited significantly increased relative abundances of Bacteroides, Helicobacter, etc., and significantly decreased relative abundances of Alloprevotella, Prevotella, etc. Innate metabolite levels were significantly different in mice that survived less than 3 days and mice that survived more than 3 days. In conclusion, CLP-induced sepsis in mice changes the structure of the gut microbiome, and innate metabolites affect the prognosis of septic mice.© 2023. The Author(s), under exclusive licence to Springer Nature Switzerland AG.