Pyroptosis serves a crucial function in various types of ischemia and reperfusion injuries. Oridonin, a tetracycline diterpene derived from Rabdosia rubescens, can significantly inhibit the aggregation of NLRP3-mediated inflammasome. This experiment is aimed at investigating the effect of oridonin on pyroptosis in mice cardiomyocytes. Based on the models of myocardial ischemia/reperfusion (I/R) and hypoxia/reoxygenation (H/R), Evans Blue/TTC double staining, TUNEL staining, and Western blotting were applied to determine the effects of oridonin on myocardial damage, cellular activity and signaling pathways involved in pyroptosis. During I/R and H/R treatments, the extent of gasdermin D-N domains was upregulated in cardiomyocytes. Apart from that, oridonin improved cell survival in vitro and decreased the myocardial infarct size in vivo by also downregulating the activation of pyroptosis. Finally, the expression levels of ASC, NLRP3 and p-p65 were markedly upregulated in cardiomyocytes after H/R treatment, whereas oridonin suppressed the expression of these proteins. The present experiment revealed that myocardial I/R injury and pyroptosis can be alleviated and inhibited by oridonin pretreatment via NF-κB/NLRP3 signaling pathway, both in vivo and in vitro. Therefore, oridonin may serve as a potentially novel agent for the clinical treatment of myocardial ischemia-reperfusion injuries.