Patients with inflammatory bowel disease (IBD) frequently experience chronic pain. Patients will often seek out care in the emergency department (ED) where short-term opioid use may be associated with potential treatment-related complications. We aimed to assess the rate and factors associated with opioid prescription in IBD patients discharged from the ED. We conducted a cross-sectional analysis of data collected in the US National Hospital Ambulatory Medical Care Survey (NHAMCS) from 2006-2017. We determined the proportion of adult patients (≥18 years) with IBD prescribed an opioid in ED or at ED discharge. Logistic regression was used to evaluate predictors of opioid prescription. Time-trend analysis was performed to evaluate temporal patterns in opioid use. All analyses were adjusted for complex survey design. We identified ∼965,000 weighted discharges from the ED for patients with IBD. In total, 51.9% [95% CI: 42.2% -61.6%] of visits resulted in opioid administration in ED and 35.3% [95% CI: 26.5% -45.2%] of IBD-related ED discharges were associated with an opioid prescription. IBDpatients with moderate/severe pain (adjusted odds ratio aOR 5.06 [95% CI: 1.72 -14.90], p< 0.01) were more likely to receive opioids whereas older age (aOR 0.73 per decade [95% CI: 0.55 -0.98], p = 0.04) were less likely. In temporal analysis, a trend towards decreasing opioid use in ED and opioid prescriptions at discharge was observed in 2015-2017. More than one third of IBD patients are prescribed an opioid at discharge from ED, highlighting a potential gap in care for accessing effective pain management solutions in this population.