Codonopsis pilosula, an important medicinal and edible plant in traditional Chinese medicine, is used widely as a tonifying herb for various immunodeficiency diseases. A neutral polysaccharide (CPPs-D1N1) was purified from C. pilosula, composed of fructose and glucose in a molar ratio of 97.28:2.72, with an average molecular weight of 5.985 kDa. Structural analysis revealed a backbone composed of →1)-β-D-Fruf-(2 → units with some β-D-Fruf-(2 → linkages. In a murine immunosuppression model induced by cyclophosphamide injection, oral treatment with C. pilosula polysaccharide was administered, investigating changes in gut microbiota during therapy. The polysaccharide modulated serum immunoglobulins (Ig-G, Ig-M), cytokines (IL-2, IL-6, TNFα), and spleen and thymus indices in immunodeficient mice. Additionally, functional gene primer sequencing enrichment methods revealed alterations in abundance, diversity, and structure of butyrate-producing bacterial populations in the gut, with primary differential genera identified as Butyribacter, Rumanococcus, Dysosmobacter, and Ruseburia. This study provides in vivo evidence supporting the beneficial effects of C. pilosula polysaccharide oral therapy in improving gut microbiota, particularly butyrate-producing bacteria, during treatment of immunosuppressive diseases.