The present study aimed to investigate whether pretreatment with rosuvastatin (RS) can provide cardioprotection in a myocardial ischemia/reperfusion (MI/R) model. The protective effect of RS on myocardial oxygen‑glucose deprivation/reperfusion (OGD/R) injury was also evaluated by upregulating peroxisome proliferator‑activated receptor‑γ (PPAR‑γ). In the present study, MI/R model was established and activities of superoxide dismutase (SOD), lactate dehydrogenase (LDH), creatine kinase‑muscle/brain (CK‑MB), malondialdehyde (MDA), and troponin I/T were measured. The infarct size was measured using Evans blue staining and cell viability was measured by MTT assay. Reactive oxygen species (ROS) levels were assessed by flow cytometry. Caspase‑9, cytochrome c (cyt c), mitochondrial uncoupling protein 2 (UCP2) and PPAR‑γ expression levels were detected by reverse transcription‑quantitative polymerase chain reaction and western blotting. The results indicated that RS increased SOD activity, and decreased LDH, CK‑MB, MDA and troponin I/T activities. The effect of RS was reversed by atractyloside (ATR). RS inhibited myocardial infarct size, downregulated expression of caspase‑9 and cyt c and upregulated expression of UCP2 and PPAR‑γ by inhibiting ATR. Furthermore, the results indicated that RS promoted cardiomyocyte viability, inhibited LDH release, reduced ROS production, decreased expression of caspase‑9 and cyt c, and increased expression of UCP2 and PPAR‑γ following OGD/R damage. Therefore, the present study demonstrated that RS protects primary myocardial cells against OGD/R injury by regulating PPAR‑γ and UCP2. RS may be a promising therapeutic agent for treatment of MI/R injury.