AimsOptimizing glycemic control may prevent liver‐related events and major adverse cardiovascular events (MACE) in patients with metabolic dysfunction‐associated steatotic liver disease (MASLD). However, the optimal hemoglobin A1c (HbA1c) threshold associated with a lower risk of complications, particularly liver‐related events as well as MACE is unknown.MethodsWe investigated a nationwide population‐based cohort and identified 633 279 patients with MASLD, with a mean follow‐up of 4.2 years. Hemoglobin A1c levels were measured annually. The primary endpoint was the risk of liver‐related events and MACE and to determine the optimal HbA1c level associated with the risk of complications.ResultsMean HbA1c (per 1%) was associated with liver‐related events (subdistribution hazard ratio [sHR] 1.26; 95% confidence interval [CI], 1.12–1.42) as well as MACE (sHR 1.36; 95% CI, 1.32–1.41) after adjustment for confounders. Multivariable sHR (95% CI) for HbA1c of <5.0%, 6.0%–6.9%, 7.0%–7.9%, 8.0%–8.9%, and ≥9.0% (reference, 5.0%–5.9%) were 14 (9.1–22), 1.70 (1.2–2.3), 3.32 (2.3–4.8), 3.81 (2.1–6.8), and 4.83 (2.4–9.6) for liver‐related events, and 1.24 (0.8–1.8), 1.27 (1.2–1.4), 1.70 (1.5–2.0), 2.36 (1.9–2.9), and 4.17 (3.5–5.0) for MACE. An HbA1c level of 7% was selected as the optimal threshold for predicting complications (sHR 2.40 [1.8–3.2] for liver‐related events and 1.98 [1.8–2.2] for MACE).ConclusionThe risk of liver‐related events as well as MACE increased in a dose‐dependent fashion with an increase in HbA1c levels, except for patients with HbA1c <5.0% for liver‐related events. An HbA1c level of 7% was the optimal threshold associated with a lower risk of complications and may be utilized as a target for glycemic control in patients with MASLD.