Previous studies showed that some patients after the treatment of anti-programmed cell death protein-1 (anti-PD-1) antibodies experienced immune-related diarrhea. In this study, we aim to explore the association between intestinal microbiota and immune-related diarrhea.We obtained the fecal samples of 26 advanced lung cancer patients before the first dose of anti-PD-1 antibodies.Eight of 26 patients experienced diarrhea after the treatment of anti-PD-1 antibodies. At the phylum level, our study demonstrated that Bacteroidetes were higher in diarrhea-free (D-F) patients, while Firmicutes were lower. Bacteroides and Parabacteroides belonging to Bacteroidetes phylum and Phascolarctobacterium of Firmicutes phylum were more abundant in D-F patients. Whereas, Veillonella of Proteobacteria phylum was lower in D-F patients.Our study highlights that intestinal microbiota variation is correlated with the subsequent development of immune-related diarrhea.