Background:In critically ill patients, the most common manifestation of brain dysfunction is delirium, which is independently associated with higher morbidity and mortality. While electrolyte imbalance is one of the precipitating factors, the impact of hypomagnesemia on the incidence of delirium remains unknown. Methods: We retrospectively analyzed patients admitted to the medical intensive care unit (ICU) of a tertiary referral center between January and June 2020. Patients with ICU stay ≥48 hours and aged 40-85 years were included. The primary outcome was cumulative incidence of delirium in the ICU. Patients were divided into two groups based on serum magnesium level at ICU admission. Multivariable Cox proportional hazards regression analysis was performed, and covariates were selected using the least absolute shrinkage and selection operator (LASSO) method. Results: A total of 109 patients included 43 (39.4%) women and had a median age of 69.0 years (interquartile range [IQR], 60.0-76.0 years). The median magnesium level was 1.7 mg/dl (IQR, 1.5-1.9 mg/dl), and the cumulative incidence of delirium was 32.1% (35 patients). Hypomagnesemia was independently associated with delirium (adjusted hazard ratio [aHR], 2.12; 95% confidence interval [CI], 1.03-4.38), along with prior use of immunosuppressants (aHR, 3.08; 95% CI, or benzodiazepines (aHR, 4.02; 95% CI,, body mass index (aHR, 0.93; 95% CI, 0.84-1.02), and alcohol history (aHR, 1.68; 95% CI, 0.74-3.80). Conclusions: In critically ill adults, hypomagnesemia increases the risk of delirium by more than two-fold compared to patients with normal magnesium level.