Myocardial ischemia-reperfusion (I/R) serves a crucial role in myocardial infarction. C1q/TNF-related protein 12 (CTRP12) is a secretory protein involved in metabolism. It has been reported that CTRP12 participates in the regulation of numerous cardiovascular diseases. However, its role in myocardial I/R injury remains unclear. In the present study, the left anterior descending coronary artery in mice was ligated to establish a mouse I/R model. A myocardial hypoxia-reoxygenation (H/R) cell model was also established. Cardiomyocyte injury was evaluated using hematoxylin and eosin staining, Cell Counting Kit-8 and a lactate dehydrogenase (LDH) kit. The expression levels of CTRP12 and Krueppel-like factor 15 (KLF15) in murine myocardial tissues and H9c2 cells were determined using reverse transcription-quantitative PCR and western blotting, as KLF15 was previously reported to protect against I/R-induced cardiomyocyte damage. Furthermore, inflammatory factors TNF-α, IL-1β and IL-6 were analyzed using ELISA while apoptosis was assessed using TUNEL assays and western blotting. Moreover, the activity of the CTRP12 promoter was determined using a dual-luciferase reporter assay. The results demonstrated that I/R surgery markedly exacerbated myocardial tissue damage, whereas H/R treatment significantly reduced cell viability and significantly increased LDH activity as well as the release of inflammatory factors and apoptosis. I/R and H/R induction significantly reduced the expression levels of CTRP12 and KLF15. CTRP12 overexpression significantly alleviated H/R-induced cell injury and significantly inhibited inflammation and apoptosis. Further analysis demonstrated that KLF15 could significantly promote the activity of the CTRP12 promoter. However, following CTRP12 knockdown, KLF15 overexpression exacerbated cell injury, inflammation and apoptosis. In conclusion, the present study demonstrated that CTRP12 may mitigate inflammation and apoptosis in H/R-induced cardiomyocytes, possibly via the regulation of KLF15, which provided a theoretical basis for the potential treatment of I/R-induced myocardial infarction.