Pharmacological preconditioning and postconditioning may reduce myocardial necrosis and apoptosis during ischemia/reperfusion (I/R), however, hypercholesterolemia interferes with the associated cardioprotective mechanisms. The present study investigated whether pharmacological preconditioning and postconditioning with nicorandil could attenuate myocardial necrosis and apoptosis induced by I/R in hypercholesterolemic rats, and explored the possible mechanisms involved. Male Wistar rats (n=160) were fed normal (normocholesterolemic group, n=10) or high-cholesterol (hypercholesterolemic group, n=150) diets for 8 weeks. Hearts harvested from the normal and hypercholesterolemic rats were subsequently placed on modified Langendorff perfusion apparatus and 30-min global ischemia was performed, followed by 120-min reperfusion. Nicorandil (1, 3, 10, 30, 100 µmol/l), and mitochondrial adenosine triphosphate-sensitive potassium (mitoKATP) channel blocker 5-hydroxydecanoic acid sodium salt (5-HD) (100 µmol/l) or soluble guanylyl cyclase (sGC) blocker 1H-[1,2,4]oxadiazolo[4,3-a]quinoxalin-1-one (ODQ) (10 µmol/l) were perfused for 10 min, prior to ischemia or at the onset of reperfusion. The myocardial infarct size was determined by triphenyltetrazolium chloride staining, and cardiomyocyte apoptosis was detected by terminal deoxynucleotidyl transferase dUTP nick-end labeling staining. In order to investigate the potential mechanisms, the expression levels of caspase-3, B-cell lymphoma-2 (Bcl-2) proteins and Bcl-2-associated X protein (Bax) were measured using western blot analysis. The present study demonstrated that, in hypercholesterolemic rats, pharmacological preconditioning and postconditioning with nicorandil decreased I/R-induced myocardial necrosis and apoptosis in a concentration-dependent manner. The optimal preconditioning and postconditioning concentration of nicorandil determined to have anti-infarct and anti-apoptosis effects was 30 µmol/l, which significantly (P<0.05) reduced the infarct size to 14.88±3.25% and 15.96±3.29%, and attenuated the percentage of cardiomyocyte apoptosis to 25.20±3.93% and 26.18±4.82%, respectively, compared with the I/R group. However, the cardioprotective effects of nicorandil were partially suppressed by cotreatment with 5-HD or ODQ. Western blot analysis demonstrated that pharmacological preconditioning and postconditioning with nicorandil significantly downregulated caspase-3 and Bax expression, and upregulated Bcl-2 expression compared with the I/R group (P<0.05). The results of the present study suggest that pharmacological preconditioning and postconditioning with nicorandil may protect hypercholesterolemic hearts against I/R-induced necrosis and apoptosis; and the cardioprotective effects of nicorandil may be due to the dual pharmacological mechanisms of opening the mitoKATP channels and a nitric oxide/sGC-dependent mechanism, and regulation of the expression of caspase-3, Bax and Bcl-2.