The mechanism of long-term cognitive impairment after neonatal sepsis remains poorly understood, although long-lasting neuroinflammation has been considered the primary contributor. Necroptosis is actively involved in the inflammatory process, and in this study, we aimed to determine whether neonatal sepsis-induced long-term cognitive impairment was associated with activation of necroptosis. Rat pups on postnatal day 3 (P3) received intraperitoneal injections of lipopolysaccharide (LPS, 1 mg/kg) to induce neonatal sepsis. Intracerebroventricular injection of IL-1β-siRNA and necrostatin-1 (NEC1) were performed to block the production of IL-1β and activation of necroptosis in the brain, respectively. The Morris water maze task and fear conditioning test were performed on P28–P32 and P34–P35, respectively. Enzyme-linked immunosorbent assay (ELISA), quantitative real-time PCR (RT-PCR), and Western blotting were used to examine the expression levels of proinflammatory cytokines and necroptosis-associated proteins, such as receptor-interacting protein 1 (RIP1) and receptor-interacting protein 3 (RIP3). Sustained elevation of IL-1β level was observed in the brain after initial neonatal sepsis, which would last for at least 32 days. Sustained necroptosis activation was also observed in the brain. Knockdown of IL-1β expression in the brain alleviated necroptosis and improved long-term cognitive function. Direct inhibition of necroptosis also improved neurodevelopment and cognitive performance. This research indicated that sustained activation of necroptosis via IL-1β contributed to long-term cognitive dysfunction after neonatal sepsis.