25-hydroxycholesterol (25-HC) plays a role in the regulation of cell survival and immunity. However, the effect of 25-HC on myocardial ischemia/reperfusion (MI/R) injury remains unknown. Our present study aimed to investigate whether 25-HC aggravated MI/R injury through NLRP3 inflammasome-mediated pyroptosis. The overlapping differentially expressed genes (DEGs) in MI/R were identified from the GSE775, GSE45818, GSE58486, and GSE46395 datasets in Gene Expression Omnibus (GEO) database. Gene ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) pathway enrichment analyses were conducted using the database of Annotation, Visualization and Integration Discovery (DAVID). The protein-protein interaction (PPI) network of the overlapping DEGs was established using the Search Tool for the Retrieval of Interacting Genes (STRING) database. These bioinformatics analyses indicated that cholesterol 25-hydroxylase (CH25H) was one of the crucial genes in MI/R injury. The oxygen-glucose deprivation/reoxygenation (OGD/R) cell model was established to simulate MI/R injury. Western blot and RT-qPCR analysis demonstrated that CH25H was significantly upregulated in OGD/R-stimulated H9C2 cardiomyocytes. Moreover, knockdown of CH25H inhibited the OGD/R-induced pyroptosis and nod-like receptor protein 3 (NLRP3) inflammasome activation, as demonstrated by cell counting kit-8 (CCK8), lactate dehydrogenase (LDH), RT-qPCR, and western blotting assays. Conversely, 25-HC, which is synthesized by CH25H, promoted activation of NLRP3 inflammasome in OGD/R-stimulated H9C2 cardiomyocytes. In addition, the NLRP3 inhibitor BAY11-7082 attenuated 25-HC-induced H9C2 cell injury and pyroptosis under OGD/R condition. In conclusion, 25-HC could aggravate OGD/R-induced pyroptosis through promoting activation of NLRP3 inflammasome in H9C2 cells.