BackgroundAcute hyperglycemia is associated with worse outcomes in diabetic patients admitted with ST-elevation myocardial infarction (STEMI). However, the impact of full-scale decompensated diabetes on STEMI outcomes has not been investigated.MethodsWe utilized the national inpatient sample (2003–2014) to identify adult diabetic patients admitted with STEMI. We defined decompensated diabetes as the presence of diabetic ketoacidosis (DKA) or hyperglycemic hyperosmolar state (HHS). We compared in-hospital morbidity and mortality and cost between patients with and without diabetes decompensation before and after propensity-score matching.ResultsA total of 73,722 diabetic patients admitted with STEMI were included in the study. Of those, 1131 (1.5%) suffered DKA or HSS during the hospitalization. After propensity-score matching, DKA/HHS remained associated with a significant 32% increase in in-hospital mortality (25.6% vs. 19.4%, p = 0.001). The DKA/HHS group also had higher incidences of acute kidney injury (39.4% vs. 18.9%, p < 0.001), sepsis (7.3% vs. 4.9%, p = 0.022), blood transfusion (11.3% vs. 8.2%) and a non-significant trend towards higher incidence of stroke (3.8% vs. 2.4%, p = 0.087). Also, DKA/HHS diagnosis was associated with lower rates of referral to coronary angiography (51.5% vs. 55.5%, p = 0.023), coronary stenting (26.1% vs. 34.8%, p < 0.001), or bypass grafting (6.2% vs. 8.7%, p = 0.033). Referral for invasive angiography was associated with lower odds of death during the hospitalization (adjusted OR 0.66, 95%CI 0.44-0.98, p = 0.039).ConclusionsDecompensated diabetes complicates ~ 1.5% of STEMI admissions in diabetic patients. It is associated with lower rates of referral for angiography and revascularization, and a negative differential impact on in-hospital morbidity and mortality and cost.Electronic supplementary materialThe online version of this article (10.1186/s13098-018-0357-y) contains supplementary material, which is available to authorized users.