The Absent in Melanoma 2 (AIM2) inflammasome contributes to ischemic brain injury by inducing cell pyroptosis and inflammatory responses. Our research group has previously demonstrated that ATP-sensitive potassium channels (KATP channels) openers can modulate neuronal synaptic plasticity post-ischemic stroke for neuroprotection. However, the specific mechanisms of KATP channels in the inflammatory response following ischemic stroke remain unclear. Here, we assessed cellular damage by observing changes in BV-2 morphology and viability. TTC staining, mNSS scoring, Nissl staining, and TUNEL staining were used to evaluate behavioral deficits, brain injury severity, and neuronal damage in mice subjected to Middle Cerebral Artery Occlusion (MCAO). Real-time fluorescence quantitative PCR (RT-qPCR) assessed AIM2 expression after oxygen-glucose deprivation/reperfusion (OGD/R), while Western blotting, immunofluorescence, and Enzyme-Linked Immunosorbent Assay (ELISA) measured pyroptosis-related protein expression, Nuclear Factor-kappa B/Inhibitor of κB alpha (NF-κB/IκBα) signaling activation, and inflammatory cytokine secretion during the acute ischemic phase. We observed an increase in NF-κB nuclear translocation and activation of the NF-κB/IκBα inflammatory pathway after OGD/R. Furthermore, AIM2 protein expression was upregulated and localized within the cytoplasm of BV-2 cells. Notably, low-dose Nicorandil treatment reduced pyroptosis-related protein expression, including AIM2, cleaved cysteinyl aspartate-specific protease-1 (cleaved caspase-1), Gasdermin D Full-length (GSDMD-FL), and Gasdermin D N-terminal (GSDMD-NT), reducing the pore-forming rupture rate of BV-2 cells. Further investigations revealed that the KATP channel inhibitor 5-HD upregulated p-NF-κB p65, NF-κB p65, and p-IκBα expression, promoting microglial cell activation, pyroptosis, and inflammatory factor secretion, attenuating Nicorandil's neuroprotective effect in vivo. Overall, our results suggest that opening KATP channels can improve post-ischemic neurological function by inhibiting AIM2 inflammasome-induced microglial pyroptosis and NF-κB/IκBα signaling activation.