Natural killer (NK) cells, as key immune cells, play essential roles in tumor cell immune escape and immunotherapy. Accumulating evidence has demonstrated that the gut microbiota community affects the efficacy of anti-PD1 immunotherapy and that remodeling the gut microbiota is a promising strategy to enhance anti-PD1 immunotherapy responsiveness in advanced melanoma patients; however, the details of the mechanism remain elusive. In this study, we found that
Eubacterium rectale
was significantly enriched in melanoma patients who responded to anti-PD1 immunotherapy and that a high
E. rectale
abundance was related to longer survival in melanoma patients. Furthermore, administration of
E. rectale
remarkably improved the efficacy of anti-PD1 therapy and increased the overall survival of tumor-bearing mice; moreover, application of
E. rectale
led to a significant accumulation of NK cells in the tumor microenvironment. Interestingly, conditioned medium isolated from an
E. rectale
culture system dramatically enhanced NK cell function. Gas chromatography–mass spectrometry/ultrahigh performance liquid chromatography–tandem mass spectrometry-based metabolomic analysis showed that
l
-serine production was significantly decreased in the
E. rectale
group; moreover, administration of an
l
-serine synthesis inhibitor dramatically increased NK cell activation, which enhanced anti-PD1 immunotherapy effects. Mechanistically, supplementation with
l
-serine or application of an
l
-serine synthesis inhibitor affected NK cell activation through Fos/Fosl. In summary, our findings reveal the role of bacteria-modulated serine metabolic signaling in NK cell activation and provide a novel therapeutic strategy to improve the efficacy of anti-PD1 immunotherapy in melanoma.