The gut microbiome has been shown to influence the response of tumors to anti-PD-1 (programmed cell death-1) immunotherapy in preclinical mouse models and observational patient cohorts. However, modulation of gut microbiota in cancer patients has not been investigated in clinical trials. In this study, we performed a phase 1 clinical trial to assess the safety and feasibility of fecal microbiota transplantation (FMT) and reinduction of anti-PD-1 immunotherapy in 10 patients with anti-PD-1-refractory metastatic melanoma. We observed clinical responses in three patients, including two partial responses and one complete response. Notably, treatment with FMT was associated with favorable changes in immune cell infiltrates and gene expression profiles in both the gut lamina propria and the tumor microenvironment. These early findings have implications for modulating the gut microbiota in cancer treatment.