A capsular polysaccharide, namely CPS-2, was isolated from Lactobacillus fermentum GBJ, purified using DEAE-52 anion exchange chromatography, and structurally characterized. We found that CPS-2 is homogenous, has an average molecular weight of 377 KDa, and is mainly composed of galactose and glucose at a molar ratio of 1.54:1.00. Its backbone comprises &#
x3b1;-D-Galp-(1&#
x202f;&#
x2192;&#
x202f;3), &#
x3b1;-D-Galp-(1&#
x202f;&#
x2192;&#
x202f;3,6), &#
x3b2;-D-Glcp-(1&#
x202f;&#
x2192;&#
x202f;2), &#
x3b2;-D-Galp-(1&#
x202f;&#
x2192;&#
x202f;6), and &#
x3b1;-D-Galp-(1&#
x202f;&#
x2192;&#
x202f;4) residues with a side chain of &#
x3b2;-D-Glcp-(1&#
x2192;). CPS-2 exerts an immunomodulatory effect by improving the proliferation and phagocytosis of macrophage RAW264.7 and promoting the secretion of NO and cytokines. The maximum secretion levels of IL-1&#
x3b2;, IL-6, IL-10, and TNF-&#
x3b1; were 1.96-, 0.11-, 0.22-, and 0.46-fold higher than those of the control, respectively. Furthermore, CPS-2 could significantly enhance the antioxidant system, extend lifespan, and improve stress tolerance of Caenorhabditis elegans at both exposure doses of 31.25 and 62.5&#
x202f;&#
x3bc;g/mL. The average lifespan of nematodes reached a maximum in the 62.5&#
x202f;&#
x3bc;g/mL-treated group after 10.39&#
x202f;days, 6.56&#
x202f;h, and 23.56&#
x202f;h in normal, oxidative stress, and heat shock environment, with extension percentages of 16.61&#
x202f;%, 43.23&#
x202f;%, and 15.77&#
x202f;%, respectively; therefore, CPS-2 displays an anti-aging effect. The significant bioactivity of CPS-2 promotes its application as a promising immunomodulatory and anti-aging ingredient in the food or pharmaceutical field.