Diabetic brains are more vulnerable to ischemia-reperfusion injury. Previous studies have proved that melatonin could protect against cerebral ischemia-reperfusion (CIR) injury in non-diabetic stroke models; however, its roles and the underlying mechanisms against CIR injury in diabetic mice remain unknown. Streptozotocin-induced diabetic mice and high-glucose-cultured HT22 cells were exposed to melatonin, with or without administration of the autophagy inhibitor 3-methyladenine (3-MA) and the specifically silent information regulator 1 (SIRT1) inhibitor EX527, and then subjected to CIR or oxygen-glucose deprivation/reperfusion operation. We found that diabetic mice showed aggravated brain damage, increased apoptosis and oxidative stress, and deficient autophagy following CIR compared with non-diabetic counterparts. Melatonin treatment exhibited improved histological damage, neurological outcomes, and cerebral infarct size. Intriguingly, melatonin markedly increased cell survival, anti-oxidative and anti-apoptosis effects, and significantly enhanced autophagy. However, these effects were largely attenuated by 3-MA or EX527. Additionally, our cellular experiments demonstrated that melatonin increased the SIRT1-BMAL1 pathway-related proteins' expression in a dose-dependent manner. In conclusion, these results indicate that melatonin treatment can protect against CIR-induced brain damage in diabetic mice, which may be achieved by the autophagy enhancement mediated by the SIRT1-BMAL1 pathway.