Neuroinflammation plays a critical role in the pathogenesis of postoperative cognitive dysfunction (POCD) of the elderly patients. Receptor-interacting protein kinase1 (RIPK1) is a key molecular switch modulating inflammation, apoptosis and necroptosis. Here, we investigated whether inhibiting RIPK1 by necrostatin-1 (Nec-1) could limit neuroinflammation and attenuate POCD in D-Galactose (D-Gal)-induced aged mice. The mice were subjected to anesthesia and partial hepatectomy, and necrostatin-1 was administered intraperitoneally 1 h prior to anesthesia and surgery. Cognitive function and movement were tested 24 h after surgery by open field, Barnes maze and puzzle box. The hippocampal tissues were collected to detect the following: neuroinflammation (Iba-1, IL-1α, IL-1β, TNF-α), Necroptosis (Propidium Iodide (PI) labeling, RIPK1, nuclear transcription factor kappa B (NF-κB) and neuroplasticity (doublecortin (DCX), NR2B, GluA1, GluA2). We found that anesthesia and surgery induced a significant deficit in spatial memory acquisition and impairment of executive function and memory to simple task in D-Galactose-induced aged mice. Inhibiting RIPK1 by necrostatin-1 strikingly mitigated cognitive impairment and alleviated postoperative amplified neuroinflammation, necroptosis and GluA1 loss in hippocampus. These suggest that targeting RIPK1 by necrostatin-1 may serve as a promising therapeutics for prevention of POCD in elderly patients.