Objectives We conducted a meta-analysis to quantitatively evaluate the effect of melatonin therapy on patients with myocardial ischemia-reperfusion injury (MIRI) and explore the influencing factors. Background Although preclinical studies have shown that melatonin can alleviate MIRI, its protective effect on MIRI in patients remains controversial. Methods We searched PubMed, the Cochrane Library, and Embase. The primary outcome was cardiac function (left ventricular ejection fraction [LVEF], left ventricular end-diastolic volume [LVEDV], and left ventricular end-systolic volume [LVESV]) and myocardial infarct parameters (total left ventricular mass and infarct size). Results We included nine randomized controlled clinical trials with 631 subjects. Our results showed that melatonin had no significant effects on the primary outcome, but subgroup analyses indicated that when melatonin was administered by intravenous and intracoronary injection at the early stage of myocardial ischemia, LVEF was improved (<3.5 h; standardized mean difference [SMD]:0.50; 95% CI: 0.06 to 0.94; P = 0.03) and the infarct size was reduced (<2.5 h, SMD: −0.86; 95% CI: −1.51 to −0.22; P = 0.01), whereas when melatonin was injected at the late stage of myocardial ischemia (≥3.5 h or 2.5 h), the results were the opposite. Furthermore, melatonin intervention reduced the level of cardiac injury markers, inflammatory cytokines, oxidation factors, and increased the level of antioxidant factors (P < 0.001). Conclusions The results indicated that the cardioprotective function of melatonin for MIRI was influenced by the route and timing regimen of melatonin administration; the mechanism of which may be associated with the production of inflammatory cytokines, the balance of oxidation, and antioxidant factors.