Protopanaxadiol (PPD) has potential immunomodulatory effects, but the underlying mechanism remains unclear. Here, we explored the potential roles of gut microbiota in the immunity regulation mechanisms of PPD using a cyclophosphamide (CTX)-induced immunosuppression mouse model. Our results showed that a medium dose of PPD (PPD-M, 50 mg/kg) effectively ameliorated the immunosuppression induced by CTX treatment by promoting bone marrow hematopoiesis, increasing the number of splenic T lymphocytes and regulating the secretion of serum immunoglobulins and cytokines. Meanwhile, PPD-M protected against CTX-induced gut microbiota dysbiosis by increasing the relative abundance of Lactobacillus, Oscillospirales, Turicibacter, Coldextribacter, Lachnospiraceae, Dubosiella, and Alloprevotella and reducing the relative abundance of Escherichia-Shigella. Importantly, PPD-M lost the ability to promote bone marrow hematopoiesis and enhance immunity when the gut microbiota was depleted by broad-spectrum antibiotics. Moreover, PPD-M promoted the production of microbiota-derived immune-enhancing metabolites including cucurbitacin C, l-gulonolactone, ceramide, DG, prostaglandin E2 ethanolamide, palmitoyl glucuronide, 9R,10S-epoxy-stearic acid, and 9 '-carboxy-gamma-chromanol. KEGG topology analysis showed that the PPD-M treatment significantly enriched the sphingolipid metabolic pathway with ceramide as a main metabolite. Our findings reveal that PPD enhances immunity by manipulating gut microbiota and has the potential to be used as an immunomodulator in cancer chemotherapy.