Anti–programmed cell death protein 1 (PD-1) therapy provides long-term clinical benefits to patients with advanced melanoma. The composition of the gut microbiota correlates with anti–PD-1 efficacy in preclinical models and cancer patients. To investigate whether resistance to anti–PD-1 can be overcome by changing the gut microbiota, this clinical trial evaluated the safety and efficacy of responder-derived fecal microbiota transplantation (FMT) together with anti–PD-1 in patients with PD-1–refractory melanoma. This combination was well tolerated, provided clinical benefit in 6 of 15 patients, and induced rapid and durable microbiota perturbation. Responders exhibited increased abundance of taxa that were previously shown to be associated with response to anti–PD-1, increased CD8 + T cell activation, and decreased frequency of interleukin-8–expressing myeloid cells. Responders had distinct proteomic and metabolomic signatures, and transkingdom network analyses confirmed that the gut microbiome regulated these changes. Collectively, our findings show that FMT and anti–PD-1 changed the gut microbiome and reprogrammed the tumor microenvironment to overcome resistance to anti–PD-1 in a subset of PD-1 advanced melanoma.