Background. Alcohol use disorder (AUD) is common in critically ill patients. Plasma anion gap (AG) was known as a feasible parameter and was associated with outcomes of various diseases. This study is intended to explore whether AG is related to 28-day inhospital mortality and 1-year mortality of critically ill patients with AUD. Method. We extracted data from the Medical Information Mart for Intensive Care IV (MIMIC-IV) database. The association of plasma AG with 28-day inhospital mortality and 1-year mortality of critically ill AUD patients was assessed using Cox proportional hazard regression models and stratification analyses, allowing AG as a time-varying covariate in the models. To evaluate the accuracy of AG in predicting different endpoints, receiver operator characteristic (ROC) curves were used. Result. Among the 3993 critically ill patients with AUD, AG was positively associated with 28-day inhospital mortality and 1-year mortality after adjusting confounders (
p
<
0.001
for all). Compared with lower AG (<12 mmol/L), patients in different groups (
12
≤
AG
<
14
mmol/L,
14
≤
AG
<
17
mmol/L,
17
≤
AG
<
20
mmol/L, and
AG
≥
20
mmol/L) had different HRs (95% CIs) for 28-day inhospital mortality (1.105, (0.906, 1.347); 1.171, (0.981, 1.398); 1.320, (1.108, 1.573); and 1.487, (1.254, 1.763), respectively) and 1-year mortality (1.037 (0.898, 1.196); 1.091 (0.955, 1.246); 1.201 (1.052, 1.371); and 1.3093 (1.149, 1.492), respectively). Conclusion. Increased AG is associated with greater 28-day inhospital mortality and 1-year mortality. The effect of AG on all-cause mortality is linear in critically ill AUD patients.