Background: Use of antibiotics in early life has been linked with childhood inflammatory bowel disease (IBD), but data for adults are mixed, and based on smaller investigations that did not compare risk among siblings with shared genetic or environmental risk factors. We aimed to investigate the association between antibiotic therapy and IBD in a large, population-based study. Methods: In this prospective case-control study, we identified people living in Sweden aged 16 years or older, with a diagnosis of IBD based on histology and at least one diagnosis code for IBD or its subtypes (ulcerative colitis and Crohn's disease). We identified consecutive patients with incident IBD from the ESPRESSO (Epidemiology Strengthened by histoPathology Reports in Sweden) study, cross-referenced with the Swedish Patient Register and the Prescribed Drug Register. We accrued data for cumulative antibiotic dispensations until 1 year before time of matching for patients and up to five general population controls per patient (matched on the basis of age, sex, county, and calendar year). We also included unaffected full siblings as a secondary control group. Conditional logistic regression was used to estimate multivariable-adjusted odds ratios (aORs) and 95% CIs for diagnosis of incident IBD. Findings: We identified 23 982 new patients with IBD (15 951 ulcerative colitis, 7898 Crohn's disease, 133 unclassified IBD) diagnosed between Jan 1, 2007, and Dec 31, 2016. 117 827 matched controls and 28 732 siblings were also identified. After adjusting for several risk factors, aOR in patients who had used antibiotics versus those who had never used antibiotics was 1·88 (95% CI 1·79–1·98) for diagnosis of incident IBD, 1·74 (1·64–1·85) for ulcerative colitis, and 2·27 (2·06–2·49) for Crohn's disease. aOR was higher in patients who had received one antibiotic dispensation (1·11, 1·07–1·15), two antibiotic dispensations (1·38, 1·32–1·44), and three or more antibiotic dispensations (1·55, 1·49–1·61) than patients who had none. Increased risk was noted for ulcerative colitis (aOR with three or more antibiotic dispensations 1·47, 95% CI 1·40–1·54) and Crohn's disease (1·64, 1·53–1·76) with higher estimates corresponding to broad-spectrum antibiotics. Similar but attenuated results were observed when siblings were used as the reference group, with an aOR of 1·35 (95% CI 1·28–1·43) for patients who had received three or more dispensations, compared with general population controls. Interpretation: Higher cumulative exposure to systemic antibiotic therapy, particularly treatments with greater spectrum of microbial coverage, may be associated with a greater risk of new-onset IBD and its subtypes. The association between antimicrobial treatment and IBD did not appear to differ when predisposed siblings were used as the reference controls. Our findings, if substantiated by longer-term prospective studies in humans or mechanistic preclinical investigations, suggest the need to further emphasise antibiotic stewardship to prevent the rise in dysbiosis-related chronic diseases, including IBD. Funding: National Institutes of Health. Crohn's and Colitis Foundation.