Abstract Background Colonic perforation is a rare complication associated with colonoscopy. There are no population-based studies on the risk of colonic perforation in IBD inpatients. Aim We sought to determine the prevalence of colonic perforation during colonoscopy among IBD inpatients, and to assess its risk factors. Materials and methods We obtained patient data from the Nationwide Inpatient Sample and used the International Classification of Diseases, the 9th revision, clinical modification codes, to identify IBD patients who had undergone colonoscopy in 2006. The control group consisted of inpatients who had colonoscopy without IBD. Results Colonic perforation occurred in 344/33,732 (1%) IBD hospitalizations and in 3658/578,458 (0.6%) controls without IBD (P = 0.0001). The risk of colonic perforation in the IBD group was significantly higher than the control group even after adjusting for age, gender, comorbidities and endoscopic interventions including endoscopic dilations and colonoscopic polypectomy, with adjusted odds ratio (aOR) of 1.83 (95% confidence interval [CI]: 1.40, 2.38). In addition, older age (aOR = 1.01, 95% CI: 1.006–1.015), female gender (aOR = 1.20; 95% CI: 1.04, 1.38), and therapeutic endoscopic dilation (aOR = 6.63; 95% CI: 3.95, 11.11) were independent risk factors for perforation. Colonoscopic biopsy, polypectomy and the presence of comorbidities did not increase the risk of perforation. Conclusions There appears to be a higher risk of colonoscopy-associated perforation in IBD inpatients than non-IBD controls. In addition, older age, female patients and endoscopic dilations appeared to be associated with an increased risk for perforation.