Intravitreal injection of anti-VEGF drugs has gradually become the first-line treatment for diabetic retinopathy (DR). However, diabetic macular edema (DME) caused by DR blood-retinal barrier damage is less sensitive to anti-VEGF drugs.Therefore, it is necessary to find supplementary drugs or alternative drugs that can effectively protect the structure of the blood vessel wall. Melatonin is a hormone mainly secreted by the pineal gland, which can play a number of functions in the human body such as regulating biological rhythms, scavenging free radicals, and anti-inflammatory. In recent years, studies have shown that melatonin can improve neuronal degeneration and protect blood vessel structure through multiple mechanisms in retinopathy. In terms of its protective effect on the retinal capillary structure, melatonin can improve the damage of early DR endothelial cells and pericytes through anti-oxidative stress, anti-inflammatory, and inhibiting cell apoptosis so as to protect the integrity of the blood-retinal barrier structure. It suggests that melatonin may provide new ideas for the prevention and treatment of DR, especially with DME.