Aside from PD-L1 expression, biomarkers of response to immune checkpoint inhibitors (ICIs) in non-small-cell lung cancer (NSCLC) are needed. In a previous retrospective analysis, we documented that fecal Akkermansia muciniphila (Akk) was associated with clinical benefit of ICI in patients with NSCLC or kidney cancer. In the current study, we performed shotgun-metagenomics-based microbiome profiling in a large cohort of patients with advanced NSCLC (n = 338) treated with first- or second-line ICIs to prospectively validate the predictive value of fecal Akk. Baseline stool Akk was associated with increased objective response rates and overall survival in multivariate analyses, independent of PD-L1 expression, antibiotics, and performance status. Intestinal Akk was accompanied by a richer commensalism, including Eubacterium hallii and Bifidobacterium adolescentis, and a more inflamed tumor microenvironment in a subset of patients. However, antibiotic use (20% of cases) coincided with a relative dominance of Akk above 4.8% accompanied with the genus Clostridium, both associated with resistance to ICI. Our study shows significant differences in relative abundance of Akk that may represent potential biomarkers to refine patient stratification in future studies. In a large multicentric study of patients with advanced NSCLC undergoing anti-PD-1 therapy, the relative abundance of intestinal Akkermansia spp. was shown to associate with changes in the gut microbiome ecosystem and clinical outcomes.