Research on anti-aging activity primarily focuses on crude extracts of anthocyanins, while relatively less attention has been given to anthocyanin monomers. This study was focused on exploring the anti-aging properties of the main anthocyanin monomer, petunidin-3-O-[rhamnopyranosyl-(trans-p-coumaroyl)]-5-O-(β-D-glucopyranoside) (P3G), from the fruits of Lycium ruthenicum Murray. The effects of P3G on stress endurance, lifespan, and gut microbiota in Caenorhabditis elegans were investigated. It was found that P3G significantly extended the mean lifespan by 19.50%, enhanced fitness through increased motility (30.39%) and pharyngeal pumping (18.33%), and reduced lipofuscin accumulation by 43.61% while maintaining fecundity. P3G prolonged lifespan by 20.13% and 18.82% during oxidative and heat stress, correspondingly. This effect was attributed to the activation of stress-related genes and the antioxidant system. The transcriptome results showed the enrichment in the longevity pathway and biosynthesis pathway of nematodes. The prominent role of the DAF-16 pathway was highlighted, as P3G enhanced the expression of daf-16 gene and downstream genes (sod-2, sod-3, and mlt-1), promoting nuclear accumulation of DAF-16. Moreover, modifications in the gut microbiota induced by P3G played a role in its anti-aging properties by governing gut microbial composition. Overall, P3G appeared to contribute to promoting the health of nematodes and might help delay their aging to some extent.