Gut microbes play diverse roles in modulating host fitness, including longevity; however, the molecular mechanisms underlying their mediation of longevity remain poorly understood. We performed genome-wide screens using 3,792 Escherichia coli mutants and identified 44 E. coli mutants that modulated Caenorhabditis elegans longevity. Three of these mutants modulated C. elegans longevity via the bacterial metabolite methylglyoxal (MG). Importantly, we found that low MG-producing E. coli mutants, Δhns E. coli, extended the lifespan of C. elegans through activation of the DAF-16/FOXO family transcription factor and the mitochondrial unfolded protein response (UPRmt). Interestingly, the lifespan modulation by Δhns did not require insulin/insulin-like growth factor 1 signaling (IIS) but did require TORC2/SGK-1 signaling. Transcriptome analysis revealed that Δhns E. coli activated novel class 3 DAF-16 target genes that were distinct from those regulated by IIS. Taken together, our data suggest that bacteria-derived MG modulates host longevity through regulation of the host signaling pathways rather than through nonspecific damage on biomolecules known as advanced glycation end products. Finally, we demonstrate that MG enhances the phosphorylation of hSGK1 and accelerates cellular senescence in human dermal fibroblasts, suggesting the conserved role of MG in controlling longevity across species. Together, our studies demonstrate that bacteria-derived MG is a novel therapeutic target for aging and aging-associated pathophysiology.