Aging, a complex biological process influenced by genetic, environmental, and pharmacological factors, presents a significant challenge in understanding its underlying mechanisms. In this study, we explored the divergent impacts of metformin treatment on the lifespan and healthspan of young and old C. elegans, demonstrating a intriguing “elixir in youth, poison in elder” phenomenon. By scrutinizing the gene expression changes in response to metformin in young (day 1 of adulthood) and old (days 8) groups, we identified nhr-57 and C46G7.1 as potential modulators of age-specific responses. Notably, nhr-57 and C46G7.1 exhibit contrasting regulation patterns, being up-regulated in young worms but down-regulated in old counterparts following metformin treatment. Functional studies employing knockdown approaches targeting nhr-57, a gene under the control of hif-1 with a documented protective function against pore-forming toxins in C. elegans, and C46G7.1, unveiled their critical roles in modulating lifespan and healthspan, as well as in mediating the biphasic effects of metformin. Furthermore, deletion of hif-1 retarded the influence of metformin, implicating the involvement of hif-1/nhr-57 in age-specific drug responses. These findings underscored the necessity of deciphering the mechanisms governing age-related susceptibility to pharmacological agents to tailor interventions for promoting successful aging.