Diabetes mellitus (DM) patients are at a higher risk of developing brain injury characterized by neuronal death. Melatonin, a hormone produced by the pineal gland, exerts neuroprotective effects against brain damage. However, the effect of melatonin on diabetesâinduced brain injury has not been elucidated. This study was to evaluate the role of melatonin against neuronal death in DM and to elucidate the underlying mechanisms. Herein, we found that melatonin administration significantly alleviated the neuronal death in both streptozotocin (STZ)âinduced diabetic mice and high glucose (HG)âtreated neuronal cells. Melatonin inhibited neuronal pyroptosis and excessive autophagy, as evidenced by decreased levels of NLRP3, cleaved caspaseâ1, GSDMDâN, ILâ1ÎČ, LC3, Beclin1, and ATG12 both in vivo and in vitro. MicroRNAâ214â3p (miRâ214â3p) was decreased in DM mice and HGâtreated cells, and such a downregulation was corrected by melatonin, which was accompanied by repression of caspaseâ1 and ATG12. Furthermore, downregulation of miRâ214â3p abrogated the antiâpyroptotic and antiâautophagic actions of melatonin in vitro. Our results indicate that melatonin exhibits a neuroprotective effect by inhibiting neuronal pyroptosis and excessive autophagy through modulating the miRâ214â3p/caspaseâ1 and miRâ214â3p/ATG12 axes, respectively, and it might be a potential agent for the treatment of brain damage in the setting of DM.