Acute coronary occlusion is effectively treated by primary percutaneous coronary intervention. However, myocardial ischemia–reperfusion injury is at the moment an unavoidable consequence of the procedure. Oxidative stress is central in the development of ischemia–reperfusion injury. Melatonin, an endogenous hormone, acts through antioxidant mechanisms and could potentially minimize the myocardial injury. The aim of the experimental study was to examine the cardioprotective effects of melatonin in a porcine closed-chest reperfused infarction model. A total of 20 landrace pigs were randomized to a dosage of 200 mg (0.4 mg/mL) melatonin or placebo (saline). The intervention was administered intracoronary and intravenous. Infarct size, area at risk and microvascular obstruction were determined ex vivo by cardiovascular magnetic resonance imaging. Myocardial salvage index was calculated. The plasma levels of high-sensitive troponin T were assessed repeatedly. The experimenters were blinded with regard to treatment regimen. Melatonin did not significantly increase myocardial salvage index compared with placebo [melatonin 21.8 % (16.1; 24.8) vs. placebo 20.2 % (16.9; 27.0), p = 1.00]. The extent of microvascular obstruction was similar between the groups [melatonin 3.8 % (2.7; 7.1) vs. placebo 3.7 % (1.3; 7.7), p = 0.96]. The area under the curve for high-sensitive troponin T release was insignificantly reduced by 32 % in the melatonin group [AUC melatonin 12,343.9 (6,889.2; 20,147.4) ng h/L vs. AUC placebo 18,285.3 (5,180.4; 23,716.8) ng h/L, p = 0.82]. Combined intracoronary and intravenous treatment with melatonin did not reduce myocardial reperfusion injury. The lack of a positive effect could be due to an ineffective dose of melatonin, a type II error or the timing of administration.