Epidermal growth factor receptor tyrosine kinase inhibitors (EGFR-TKIs) are highly effective against EGFR-mutant non-small cell lung cancer (NSCLC); however, identifying biomarkers that predict prognosis and adverse events is necessary. Although the gut microbiota is considered to be a biomarker for NSCLC without mutations, no studies have examined its potential as a biomarker for EGFR-mutant NSCLC. Here, we investigated the association between gut microbiota composition and diarrhea, a common side effect caused by EGFR-TKIs. In addition, we examined the association between the efficacy of EGFR-TKIs and the gut microbiota. A total of 21 NSCLC patients with EGFR mutations were enrolled. Fecal samples were collected prior to EGFR-TKI treatment and 16S rRNA metagenome sequencing was performed to evaluate the microbiota profile. In addition, α-diversity, β-diversity, and Linear discriminant analysis Effect Size (LEfSe) analyses were performed. The α-diversity of the gut microbiota was higher in patients with grade 0-1 diarrhea than in those with grade 2-3 diarrhea (Shannon, p = 0.0367). In terms of β-diversity, there was a significant difference in the best overall response between patients with a partial response (PR) to EGFR-TKIs and those with stable disease (SD)/progressive disease (PD) (weighted p = 0.041). Analysis of microbial composition revealed an increased abundance of Ruminococcus in the PR group. In patients taking EGFR-TKIs, a higher α-diversity may be associated with less severe diarrhea. In addition, a high abundance of Ruminococcus may be a potential biomarker for predicting favorable efficacy of EGFR-TKIs.