Abstract Introduction There is a scarcity of data on the influence of sex, race, insurance status on mortality, hospital length of stay (LOS), and total hospital charges for patients with ulcerative colitis (UC) and acute myocardial infarction (AMI) versus patients with Crohn’s disease and AMI. Previous studies have identified that patients with inflammatory bowel disease (IBD) have a lower incidence of AMI compared to the general population, but Ulcerative Colitis has not been compared to Crohn’s Disease for AMI. The aim of this study was to identify risk factors in a national population cohort (in the USA) admitted to hospital between 2015 and 2017. Methods All patients aged 18 years with AMI and UC and AMI and Crohn’s disease,who had been admitted to hospital between 2015 and 2017, were identified from the US Nationwide Inpatient Sample (NIS), a large publicly available all-payer inpatient care database in the USA. Multivariate regression analysis was used to estimate the odds ratios of in-hospital mortality, average length of hospital stay, and hospital charges, after adjusting for age, gender, race, primary insurance payer status, hospital type and size (number of beds), hospital region, hospital teaching status, and other demographic characteristics. Results Our study identified approximately 200,000 patients who had been discharged with either UC or Crohn’s disease from 2015 to 2017. Of these patients, 208 were admitted with UC and AMI versus 258 with Crohn’s disease and AMI. The analysis revealed that mortality was decreased (OR -1.19, p <0.237), length of stay (LOS) was increased (OR 2.08, p <0.038), and total hospital charges were increased (OR 3.54, p <0.0001) for patients with UC and AMI compared to patients with Crohn’s disease and AMI. Independent positive predictors of mortality were age, black race, and Medicaid insurance. Independent positive predictors of increased hospital LOS were age and Hispanic ethnicity. Independent positive predictors of increased total hospital charges were Hispanic ethnicity and Medicare insurance. Conclusions Patients with UC and AMI have increased LOS and total hospital charges compared to patients with Crohn’s disease and AMI. We identified key drivers for these outcomes. Previous studies showed that patients with IBD had a lower incidence of AMI compared to the general population, but newer studies demonstrate that patients with IBD may be at higher risk. This could possibly be related to the underlying shared pathophysiology of inflammation. In the future, more randomized clinical trials are required to compare patients with UC to patients with Crohn’s disease, especially the impact of therapeutic interventions on the incidence of AMI for this patient population.