Inflammatory cells, including macrophages and microglia, synthesize and release the oxysterol 25-hydroxycholesterol (25HC), which has antiviral and immunomodulatory properties. Here, we examined the effects of lipopolysaccharide (LPS), an activator of innate immunity, on 25HC production in microglia, and the effects of LPS and 25HC on CA1 hippocampal synaptic plasticity and learning. In primary microglia, LPS markedly increases the expression of cholesterol 25-hydroxylase (Ch25h), the key enzyme involved in 25HC synthesis, and increases the levels of secreted 25HC. Wild-type microglia produced higher levels of 25HC than Ch25h knock-out (KO) microglia with or without LPS. LPS treatment also disrupts long-term potentiation (LTP) in hippocampal slices via induction of a form of NMDA receptor-dependent metaplasticity. The inhibitory effects of LPS on LTP were mimicked by exogenous 25HC, and were not observed in slices from Ch25h KO mice. In vivo, LPS treatment also disrupts LTP and inhibits one-trial learning in wild-type mice, but not Ch25h KO mice. These results demonstrate that the oxysterol 25HC is a key modulator of synaptic plasticity and memory under proinflammatory stimuli.SIGNIFICANCE STATEMENT Neuroinflammation is thought to contribute to cognitive impairment in multiple neuropsychiatric illnesses. In this study, we found that a proinflammatory stimulus, LPS, disrupts hippocampal LTP via a metaplastic mechanism. The effects of LPS on LTP are mimicked by the oxysterol 25-hydroxycholesterol (25HC), an immune mediator synthesized in brain microglia. Effects of LPS on both synaptic plasticity and one-trial inhibitory avoidance learning are eliminated in mice deficient in Ch25h (cholesterol 25-hydroxylase), the primary enzyme responsible for endogenous 25HC synthesis. Thus, these results indicate that 25HC is a key mediator of the effects of an inflammatory stimulus on hippocampal function and open new potential avenues to overcome the effects of neuroinflammation on brain function.