Immune checkpoint inhibitors (ICI) have changed the therapeutic landscape of many solid tumors. Modulation of the intestinal microbiota by antibiotics (Abx) has been suggested to impact on ICI outcomes. Retrospective analysis of 475 patients with advanced solid tumors treated with ICI from 2015 to 2022. For each patient, the use of Abx was recorded from 1 month before ICI initiation until disease progression or death. The impact of Abx on objective response rates (ORR), disease control rates (DCR), progression-free survival (PFS), and overall survival (OS) was analyzed. Kaplan-Meier and log-rank tests were used to compare survival outcomes. In total 475 patients with advanced solid tumors were evaluated. Median age was 67.5 years and performance status (PS) was 0-1 in 84.6%. 66.5% of patients received Abx during treatment with ICI, mainly beta-lactams (53.8%) and quinolones (35.9%). The early exposure to Abx (from 60 days before to 42 days after the first cycle of ICI) was associated with a lower ORR (27.4% vs 39.4%; P < .01), a lower DCR (37.3% vs 57.4%; P < .001), lower PFS (16.8 m vs 27.8 m; HR 0.66; P < .001]) and lower OS (2.5 m vs 6.6 m; HR 0.68; P = .001]). The negative impact of Abx on OS and PFS was confirmed by a multivariable analysis. This effect was not observed among patients receiving Abx after 6 weeks from ICI initiation. Our results validate the hypothesis of a detrimental effect of an early exposure to Abxon the efficacy of ICI in a multi-tumor cohort of patients.