Neuroinflammation can cause cognitive deficits, and pre-existing neuroinflammation is very common in the clinic after trauma, surgery, and infection. Patients with pre-existing neuroinflammation often need further medical treatment under general anesthesia. However, it is still unknown the effects of postconditioning with general anesthetics on the pre-existing neuroinflammation. In this study, adult rats were post-treated with sevoflurane or propofol after intracerebroventricular administration of lipopolysaccharide. The effects of sevoflurane or propofol postconditioning on neuroinflammation-induced recognition memory deficit were detected. Our results found that postconditioning with sevoflurane, but not propofol reversed the selective spatial recognition memory impairment induced by neuroinflammation, and these differential effects did not appear to be associated with the similar anti-neuroinflammatory response of general anesthetics. However, postconditioning with propofol induced a selective long-lasting upregulation of extrasynaptic NR2B-containing NMDARs in the dorsal hippocampus, which down-regulated the CREB signaling pathway, and impaired spatial recognition memory. Additionally, the NR2B antagonists, memantine and Ro2506981, reversed this neurotoxicity induced by propofol postconditioning. Altogether, these results indicate that under the pre-existing neuroinflammation, postconditioning with sevoflurane can provide reliable neuroprotection through attenuating LPS-induced neuroinflammation, apoptosis, neuronal loss, and eventually improving spatial recognition deficit. However, although posttreatment with propofol also have the same anti-neuroinflammatory effects, the neurotoxicity caused by propofol postconditioning following neuroinflammation deserves to be continuously concerned.