Increasing evidence has demonstrated that ischemic preconditioning (IPC) increases cerebral tolerance to subsequent prolonged ischemic insults. However, the exact mechanisms underlying the process have not been fully explored. In the current study, we aim to investigate whether NLRP3 inflammasome and cell pyroptosis are involved in the neuroprotective mechanism of IPC after ischemic stroke. In vitro, IPC was set up by exposing BV-2 cells to 10 min of oxygen–glucose deprivation (OGD). In vivo, IPC was performed by a transient cerebral ischemia of 10 min occlusion of the middle cerebral artery (MCA) in mice. We found that the NLRP3 inflammasome was activated and cell pyroptosis was induced at 6 h and 24 h post-stroke in an ischemic brain. IPC treatment increased cell viability under OGD state, reduced the infarct size, and attenuated the neurological deficits of mice. However, the effects NLRP3 inflammasome activation and pyroptosis after stroke were attenuated by IPC, which decreased the expression of NLRP3, ASC, cleaved caspase 1, and GSDMD-N and reduced the production of IL-1β and IL-18. In addition, confocal immunofluorescence staining of Annexin V-mCherry and SYTOX green was inhibited by IPC. These findings suggest a more enhanced link between IPC and inflammatory signature and cell death, highlighting that the NLRP3 inflammasome may act as a promising target for the prevention and treatment of ischemic stroke.