Subretinal fibrosis is a main cause of visual loss in patients with neovascular age-related macular degeneration (nAMD), for whom there has been a lack of effective medication. Metformin can improve inflammation and angiogenesis in eye diseases. This study aimed to investigate the mechanism by which metformin inhibits subretinal fibrosis. A subretinal fibrosis cell model was induced by treating human retinal pigment epithelial cells (ARPE-19) with TGF-beta 1, a subretinal fibrosis mouse model was induced by a laser, and both cells and mice were treated with metformin. Cell proliferation, migration, and invasion were detected by CCK-8, scratch, and Transwell assays. Western blotting and immunofluorescence were used to evaluate protein expression levels, and RT-qPCR was used to detect gene expression levels. HE and Masson staining were used to observe the morphological changes in retinal and choroidal tissues. Metformin treatment inhibited the TGF-beta 1-induced proliferation, migration, invasion and epithelial-mesenchymal transition (EMT) of ARPE-19 cells and effectively ameliorated laser-induced subretinal fibrosis in mice. Mechanistically, metformin inhibits the expression of miR-126-5p, promotes Klotho synthesis, slows the progression of subretinal fibrosis, and miR-126-5p targets and negatively regulates Klotho. Metformin activates Klotho by inhibiting miR-126-5p, thereby reversing TGF-beta 1-induced ARPE-19 cell EMT and improving laser-induced subretinal fibrosis in mice.