Postbiotics are the inactive bacteria and/or metabolites of beneficial microbes which have been recently found to be as effective as their live probiotic. This study aimed to evaluate the benefits of Lactobacillus plantarum (LP)-derived postbiotics on ameliorating Salmonella-induced neurological dysfunctions. Mice were pretreated with LP postbiotics (heat-killed bacteria or the metabolites) or active bacteria, and then challenged with Salmonella enterica Typhimurium (ST). Results showed that LP postbiotics, particularly the metabolites, effectively prevented ST infection in mice, as evidenced by the inhibited weight loss, bacterial translocation, and tissue damages. The LP postbiotics markedly suppressed brain injuries and neuroinflammation (the decreased interleukin (IL)-1β and IL-6, and the increased IL-4 and IL-10). Behavior tests indicated that LP postbiotics, especially the metabolites, protected mice from ST-induced anxiety and depressive-like behaviors and cognitive impairment. A significant modulation of neuroactive molecules (5-hydroxytryptamine, gamma-aminobutyric acid, brain-derived neurotrophic factor, dopamine, acetylcholine, and neuropeptide Y) was also found by LP postbiotic pretreatment. Microbiome analysis revealed that LP postbiotics optimized the cecal microbial composition by increasing Helicobacter, Lactobacillus and Dubosiella, and decreasing Mucispirillum, norank_f_Oscillospiraceae, and Eubacterium_siraeum_group. Moreover, LP postbiotics inhibited the reduction of short-chain fatty acids caused by ST infection. Pearson's correlation assays further confirmed the strong relationship of LP postbiotics-mediated benefits and gut microbiota. This study highlights the effectiveness of postbiotics and provide a promising strategy for preventing infection-induced brain disorders by targeting gut–brain axis.