Hypoxic-ischemic encephalopathy (HIE) is recognized as the main cause of neonatal death, and efficient treatment strategies remain limited. Given the prevalence of HIE and the associated fatality, further studies on its pathogenesis are warranted. Oxidative stress and neuroinflammatory injury are two important factors leading to brain tissue injury and nerve cell loss in HIE. Neferine, an alkaloid extracted from lotus seed embryo, exerts considerable effects against several diseases such as cancers and myocardial injury. In this study, we demonstrated the neuroprotective effect of neferine on HIE and hypothesized that it involves the inhibition of neuronal pyroptosis, thereby ameliorating neurological inflammation and oxidative stress. We demonstrated that the mRNA levels of proteins associated with pyroptosis including caspase-1, the caspase adaptor ASC, gasdermin D, interleukin- (IL-) 18, IL-1β, and some inflammatory factors were significantly increased in neonatal HIBD model rats compared to those in the control group. The increase in these factors was significantly suppressed by treatment with neferine. We stimulated PC12 cells with CoCl2 to induce neuronal HIBD in vitro and investigated the relationship between neferine and pyroptosis by altering the expression of the NLRP3 inflammasome. The overexpression of NLRP3 partially reversed the neuroprotective effect of neferine on HIBD, whereas NLRP3 knockdown further inhibited caspase-1 activation and IL-1β and IL18 expression. In addition, simultaneous alteration of NLRP3 expression induced changes in intracellular oxidative stress levels after HIBD. These findings indicate that neferine ameliorates neuroinflammation and oxidative stress injury by inhibiting pyroptosis after HIBD. Our study provides valuable information for future studies on neferine with respect to neuroinflammation and pyroptosis.