Background: The pathogenesis of sepsis-associated encephalopathy (SAE) is complicated, while the efficacy of current treatment technologies is poor. Therefore, the discovery of related targets and the development of new drugs are essential.Methods: A mouse model of SAE was constructed by intraperitoneal injection of lipopolysaccharide (LPS). LPS treatment of microglia was used to build an in vitro model of inflammation. Nine-day survival rates, behavioral testing, transmission electron microscopy (TEM), immunohistochemical (IHC), immunofluorescence (IF), and ELISA were performed. The expression levels of Occludin, Claudin 5, NLRP3, caspase-1, and ASC genes and proteins were detected by RT-qPCR or Western blot. Caspase-1 P10 (Casp-1 P10) protein expression was detected. 16S rDNA sequencing and gas chromatography-mass spectrometer (GC-MS) were used to analyze the gut microbiota and metabolism. Flow cytometric experiment and Cell Counting Kit-8 (CCK8) assay were performed.Results: NU9056 improved the survival rate of mice and alleviated LPS-induced cognitive impairment, anxiety, and depression in vivo. The tight junctions were thickened via NU9056 treatment. Further, the mRNAs and proteins expression levels of Occludin and Claudin 5 were up-regulated by NU9056. NU9056 increased the expression level of DCX. The expression levels of Iba-1, NLRP3, IL-1β, ASC, and Casp-1 P10 were down-regulated by NU9056. The composition of the gut microbiota changed. Kyoto Encyclopedia of Genes and Genomes data predicted that the effects of NU9056 might be related to apoptosis and tight junction pathways. NU9056 up-regulated the concentration of acetate, propionate, and butyrate. NU9056 significantly reduced LPS-induced apoptosis of microglia, the average fluorescence intensity of ROS, and the release of IL-1β and IL-18, while improving cell viability in vitro.Conclusions: NU9056 might effectively alleviate LPS-induced cognitive impairment and emotional disorder in experimental mice by inhibiting the NLRP3 inflammasome. The therapeutic effects may be related to gut microbiota and derived metabolites. NU9056 might be a potential drug of SAE prevention.