Diabetes is one of the most impactful diseases worldwide. The most commonly prescribed anti-diabetic drug is metformin. In this study, we identified an endosomal Na+/H+ exchanger (NHE) as a new potential target of metformin from an unbiased screen in Caenorhabditis elegans. The same NHE homolog also exists in flies, where it too mediates the effects of metformin. Our results suggest that endosomal NHEs could be a metformin target and provide an insight into a novel mechanism of action of metformin on regulating the endocytic cycle.