BACKGROUND: The association between the stress hyperglycemia ratio (SHR) and short-term prognosis of acute heart failure (AHF), particularly among those admitted to the intensive care unit (ICU), has not been elucidated. This study aimed to investigate the association between the SHR and adverse outcomes among critically ill patients with AHF and provide a reference for glycemic management range in these patients. METHODS: We extracted the clinical data of patients from the MIMIC-IV (v3.0) database. The association between the SHR and short-term prognosis was analyzed using the Kaplan‒Meier survival curve, Cox regression, and subgroup analysis. Important features were identified utilizing machine learning methods. Furthermore, the association between the dynamic SHR level and mortality was explored using restricted cubic splines and Cox regression. RESULTS: A total of 994 patients were included. Patients with the highest SHR (Quartile 4) had a higher risk of 30-day mortality (HR = 2.14
95% CI = 1.32-3.45
P = 0.002) and in-hospital mortality (HR = 2.22
95% CI = 1.27-3.88
P = 0.005) than those in Quartile 2 (as reference). The results of machine learning methods revealed the SHR was an important predictor for 30-day mortality of patients with critical AHF. Restricted cubic splines indicated a J-shaped association between the dynamic SHR level and mortality, and the cut-off values were 0.84 and 1.07. CONCLUSION: The SHR was significantly associated with 30-day mortality and in-hospital mortality among patients with critical AHF. The SHR may be a useful indicator for the glycemic management of patients with AHF in the ICU.