Multiple exposures to anesthesia may increase the risk of cognitive impairment in young children. However, the mechanisms underlying this neurodevelopmental disorder remain elusive. In this study, we investigated alteration of the gut microbiota after multiple neonatal exposures to the anesthetic sevoflurane and the potential role of microbiota alteration on cognitive impairment using a young mice model. Multiple neonatal sevoflurane exposures resulted in obvious cognitive impairment symptoms and altered gut microbiota composition. Fecal transplantation experiments confirmed that alteration of the microbiota was responsible for the cognitive disorders in young mice. Microbiota profiling analysis identified microbial taxa that showed consistent differential abundance before and after fecal microbiota transplantation. Several of the differentially abundant taxa are associated with memory and/or health of the host, such as species of Streptococcus, Lachnospiraceae, and Pseudoflavonifractor. The results reveal that abnormal composition of the gut microbiota is a risk factor for cognitive impairment in young mice after multiple neonatal exposures to sevoflurane and provide insight into a potential therapeutic strategy for sevoflurane-related neurotoxicity.