The study examined the leukoglycemic index (LGI), which is calculated as white blood cell count (×10^9/L) × blood glucose (mg/dL)/1000 from measurements taken during the first 24 hours in the ICU in patients with acute stroke. It included 5267 patients from the MIMIC-IV database and 424 patients from the institutional neurosurgical ICU cohort. The primary outcome was 28-day mortality, secondary outcomes were in-hospital mortality and 365-day mortality in MIMIC-IV. In MIMIC-IV, patients in the highest quartile of adjusted LGI had a more than three-fold higher risk of 28-day mortality compared to the lowest quartile (HR 3.259; 95% CI 2.568–4.138; p for trend <0.001) and a higher risk of 365-day mortality (HR 2.203–3.317; p for trend <0.001). In the inpatient cohort, LGI was associated with 28-day mortality (adjusted HR 1.351; 95% CI 1.090–1.675), and the highest in-hospital mortality was in the upper quartile of LGI. Spline analyzes showed a sharp increase in risk from low to intermediate LGI and a gradual increase at higher levels, with consistent associations across subgroups. LGI may serve as a simple biomarker for early mortality risk stratification.