Metformin, a widely used first-line drug for treatment of type 2 diabetes (T2D), has been shown to extend lifespan and delay the onset of age-related diseases. However, its primary locus of action remains unclear. Using a pure in vitro reconstitution system, we demonstrate that metformin acts through the v-ATPase-Ragulator lysosomal pathway to coordinate mTORC1 and AMPK, two hubs governing metabolic programs. We further show in Caenorhabditis elegans that both v-ATPase-mediated TORC1 inhibition and v-ATPase-AXIN/LKB1-mediated AMPK activation contribute to the lifespan extension effect of metformin. Elucidating the molecular mechanism of metformin regulated healthspan extension will boost its therapeutic application in the treatment of human aging and age-related diseases.