Cerebral microvascular endothelial cells (ECs) are crucial for brain vascular repair and maintenance, but their physiological function may be impaired during ischemic stroke and diabetes. Methylglyoxal (MGO), a reactive dicarbonyl produced during glucose metabolism, could exacerbate ischemia-induced EC injury and dysfunction. We investigated the protective effect of autophagy on cultured human brain microvascular endothelial cells (HBMEC) that underwent MGO treatment. A further study was conducted to explore the underlying mechanisms of the protective effect. Autophagic activity was assessed by evaluating protein levels, using western blot. 3-methyladenine (3-MA), bafilomycin A1, ammonium chloride (AC), Beclin 1 siRNA, and chloroquine (CQ) were used to cause autophagy inhibition. Alarmar blue assay and lactate dehydrogenase release assay were used to evaluate cell viability. Streptozotocin was administered to induce type I diabetes in rats and post-permanent middle cerebral artery occlusion was performed to elicit cerebral ischemia. Blood-brain barrier permeability was also assessed. Our study found that MGO reduced HBMEC cell viability in a concentration- and time-dependent manner, and triggered the responsive autophagy activation. Autophagy inhibitors bafilomycin A1, AC, 3-MA, and BECN1 siRNA exacerbated MGO-induced HBMEC injury. FAK phosphorylation inhibitor PF573228 inhibited MGO-triggered autophagy and enhanced lactate dehydrogenase release. Meanwhile, similar autophagy activation in brain vascular ECs was observed during permanent middle cerebral artery occlusion-induced cerebral ischemia in diabetic rats, while chloroquine-induced autophagy inhibition enhanced blood-brain barrier permeability. Taken together, our study indicates that autophagy triggered by MGO defends HBMEC against injuries.