In mice subjected to diabetic cardiomyopathy or myocardial infarction (MI) induced-surgery, Melatonin promoted heart function by enhancing autophagy and weakening apoptosis, as indicated by the elevated expression levels of Beclin1, Atg5, LC3II, and decreased p62. This evidence concerns the gene ATG5 and myocardial infarction.