Oyster polypeptide (OP) is a mixture of oligopeptides extracted from oysters through enzyme lysis, separation, and purification. It is associated with immunomodulatory effects, but the underlying mechanisms are not known. This study therefore combined proton nuclear magnetic resonance (1H-NMR) urinary metabolomics and 16S rRNA gene sequencing of the gut microbiome to determine the immunoprotective mechanisms of OP in rats subjected to cyclophosphamide-induced immunosuppression. Oyster polypeptide restored the body weight and the structure of spleen and thymus in rats with cyclophosphamide-induced immunosuppression. It upregulated the levels of white blood cells (WBCs), hemoglobin (HGB), platelets (PLT), red blood cells (RBCs), immunoglobulin G (IgG), immunoglobulin M (IgM), cytokines such as interleukin‑6 (IL-6) and tumor necrosis factor-α (TNF-α), and increased the numbers of CD3+ and CD4+ T cells in the immunosuppressed rats. The 1H-NMR metabolomics results showed that OP significantly reversed the levels of ten metabolites in urine, including 2-oxoglutarate, citrate, dimethylamine, taurine, N-phenylacetylglycine, alanine, betaine, creatinine, uracil, and benzoate. The 16S rRNA gene sequencing results showed that OP restored the gut microbiome homeostasis by increasing the abundance of beneficial bacteria and reducing the abundance of pathogenic bacteria. Finally, a combination of metabolomics and microbiomics found that the metabolism of taurine and hypotaurine, and the metabolism of alanine, aspartate, and glutamate were disturbed, but these metabolic pathways were restored by OP. This study demonstrated that OP had immunoprotective effects in rats with cyclophosphamide-induced immunosuppression by restoring key metabolic pathways and the gut microbiome homeostasis. Our findings provide a framework for further research into the immunoregulatory mechanisms of OP and its potential use in drugs and nutritional supplements. © 2024 Society of Chemical Industry.