Background: The gut microbiota has a key role in the regulation of the immune system. Disruption of the gut microbiota's composition by antibiotics might significantly affect the efficacy of immune checkpoint inhibitors. In a study of patients treated with ipilimumab, we sought to assess the relationship between overall survival and in-hospital antibiotic administration. Methods: Patients having been treated with ipilimumab between January 2012 and November 2014 were selected from the French National Hospital Discharge Summary Database. Exposure to antibiotics was defined as the presence of a hospital stay with a documented systemic bacterial infection in the 2 months before or the month after initiation of the patient's first ever course of ipilimumab. The primary outcome was overall survival. Results: We studied 43,124 hospital stays involving 1585 patients from 97 centers. All patients had received ipilimumab monotherapy for advanced melanoma. Overall, 117 of the 1585 patients (7.4%) were documented as having received systemic antibiotic therapy in hospital during the defined exposure period. The median overall survival time was shorter in patients with infection (6.3 months, vs. 15.4 months in patients without an infection; hazard ratio (HR) = 1.88, 95% confidence interval [1.46; 2.43], p = 10 −6). In a multivariate analysis adjusted for covariates, infection was still significantly associated with overall survival (HR = 1.68, [1.30; 2.18], p = 10 −5). Conclusions: In patients treated with ipilimumab for advanced melanoma, infection, and antibiotic administration in hospital at around the time of the patient's first ever course of ipilimumab appears to be associated with significantly lower clinical benefit.