Studies regarding macroautophagic/autophagic regulation in endothelial cells (ECs) under diabetic conditions are very limited. Clinical evidence establishes an endothelial protective effect of metformin, but the underlying mechanisms remain unclear. We aimed to investigate whether metformin exerts its protective role against hyperglycemia-induced endothelial impairment through the autophagy machinery. db/db mice were treated with intravitreal metformin injections. Human umbilical vein endothelial cells (HUVECs) were cultured either in normal glucose (NG, 5.5 mM) or high glucose (HG, 33 mM) medium in the presence or absence of metformin for 72 h. We observed an obvious inhibition of hyperglycemia-triggered autophagosome synthesis in both the diabetic retinal vasculature and cultured HUVECs by metformin, along with restoration of hyperglycemia-impaired Hedgehog (Hh) pathway activity. Specifically, deletion of ATG7 in retinal vascular ECs of db/db mice and cultured HUVECs indicated a detrimental role of autophagy in hyperglycemia-induced endothelial dysfunction. Pretreatment with GANT61, a Hh pathway inhibitor, abolished the metformin-mediated downregulation of autophagy and endothelial protective action. Furthermore, GLI-family (transcription factors of the Hh pathway) knockdown in HUVECs and retinal vasculature revealed that downregulation of hyperglycemia-activated autophagy by the metformin-mediated Hh pathway activation was GLI1 dependent. Mechanistically, GLI1 knockdown-triggered autophagy was related to upregulation of BNIP3, which subsequently disrupted the association of BECN1/Beclin 1 and BCL2. The role of BNIP3 in BECN1 dissociation from BCL2 was further confirmed by BNIP3 overexpression or BNIP3 RNAi. Taken together, the endothelial protective effect of metformin under hyperglycemia conditions could be partly attributed to its role in downregulating autophagy via Hh pathway activation. Abbreviations: 3-MA = 3-methyladenine; 8×GLI BS-FL = 8×GLI-binding site firefly luciferase; AAV = adeno-associated virus; AAV-Cdh5-sh-Atg7 = AAV vectors carrying shRNA against murine Atg7 under control of murine Cdh5 promoter; AAV-Cdh5-sh-Gli1 = AAV vectors carrying shRNA against murine Gli1 under control of murine Cdh5 promoter; AAV-Cdh5-Gli1 = AAV vectors carrying murine Gli1 cDNA under the control of murine Cdh5 core promoter; ACAC = acetyl-CoA carboxylase; Ad-BNIP3 = adenoviruses harboring human BNIP3`; Ad-GLI1 = adenoviruses harboring human GLI1; Ad-sh-ATG7 = adenoviruses harboring shRNA against human ATG7; Ad-sh-BNIP3 = adenoviruses harboring shRNA against human BNIP3; Ad-sh-GLI = adenoviruses harboring shRNA against human GLI; AGEs = advanced glycation end products; ATG = autophagy-related; atg7flox/flox mice = mice bearing an Atg7flox allele, in which exon 14 of the Atg7 gene is flanked by 2 loxP sites; BafA1 = bafilomycin A1; BECN1 = beclin 1; CDH5/VE-cadherin = cadherin 5; CASP3 = caspase 3; CASP8 = caspase 8; CASP9 = caspase 9; ECs = endothelial cells; GAPDH = glyceraldehyde-3-phosphate dehydrogenase; GCL = ganglion cell layer; GFP-LC3B = green fluorescent protein labelled LC3B; HG = high glucose; Hh = Hedgehog; HHIP = hedgehog interacting protein; HUVECs = human umbilical vein endothelial cells; IB4 = isolectin B4; INL = inner nuclear layer; i.p. = intraperitoneal; MAP1LC3/LC3 = microtubule-associated protein 1 light chain 3; MAN = mannitol; MET = metformin; NG = normal glucose; ONL = outer nuclear layer; p-ACAC = phosphorylated acetyl-CoA carboxylase; PECAM1/CD31= platelet/endothelial cell adhesion molecule 1; PRKAA1/2 = protein kinase AMP-activated catalytic subunits alpha 1/2; p-PRKAA1/2 = phosphorylated PRKAA1/2; PTCH1 = patched 1; RAPA = rapamycin; RL = Renilla luciferase; SHH = sonic hedgehog; shRNA = short hairpin RNA; sh-PRKAA1/2 = short hairpin RNA against human PRKAA1/2; scrambled shRNA = the scrambled short hairpin RNA serves as a negative control for the target-specific short hairpin RNA, which has the same nucleotide composition as the input sequence and has no match with any mRNA of the selected organism database; SMO = smoothened, frizzled class receptor; sqRT-PCR = semi-quantitative RT-PCR; TEK/Tie2 = TEK receptor tyrosine kinase; Tek-Cre (+) mice = a mouse strain expressing Cre recombinase under the control of the promoter/enhancer of Tek, in a pan-endothelial fashion; TUNEL = terminal deoxynucleotidyl transferase dUTP-mediated nick-end labeling.