Blockage of NLRP3 inflammasome activation ameliorates acute inflammatory injury and long-term cognitive impairment induced by necrotizing enterocolitis in mice. Here, NLRP3 is linked to necrotizing enterocolitis.