Postoperative cognitive dysfunction (POCD) is the collection of cognitive impairments, lasting days to months, experienced by individuals following surgery. Persistent POCD is most commonly experienced by older individuals and is associated with a greater vulnerability to developing Alzheimer's disease, but the underlying mechanisms are not known. It is known that laparotomy (exploratory abdominal surgery) in aged rats produces memory impairments for 4 days. Here we report that postsurgical treatment with morphine extends this deficit to at least 2 months while having no effects in the absence of surgery. Indeed, hippocampal-dependent long-term memory was impaired 2, 4, and 8 weeks postsurgery only in aged, morphine-treated rats. Short-term memory remained intact. Morphine is known to have analgesic effects via μ-opioid receptor activation and neuroinflammatory effects through Toll-like receptor 4 activation. Here we demonstrate that persistent memory deficits were mediated independently of the μ-opioid receptor, suggesting that they were evoked through a neuroinflammatory mechanism and unrelated to pain modulation. In support of this, aged, laparotomized, and morphine-treated rats exhibited increased gene expression of various proinflammatory markers (IL-1β, IL-6, TNFα, NLRP3, HMGB1, TLR2, and TLR4) in the hippocampus at the 2-week time point. Furthermore, central blockade of IL-1β signaling with the specific IL-1 receptor antagonist (IL-1RA), at the time of surgery, completely prevented the memory impairment. Finally, synaptophysin and PSD95 gene expression were significantly dysregulated in the hippocampus of aged, laparotomized, morphine-treated rats, suggesting that impaired synaptic structure and/or function may play a key role in this persistent deficit. This instance of long-term memory impairment following surgery closely mirrors the timeline of persistent POCD in humans and may be useful for future treatment discoveries.