Background: Hypomagnesemia could worsen glycemic control by impairing insulin release and promoting insulin resistance. On the contrary, type 2 diabetes mellitus (T2DM) may induce and/or exacerbate low serum magnesium levels, and this could, in turn, worsen glycemic control of diabetes. Objective: The aim of this study was to investigate the relationship between serum magnesium level, dietary magnesium intake, and metabolic control parameters in patients with T2DM. Methods: The study included 119 patients with T2DM (26 male, 93 female; mean age 54.7 +/- 8.4 years). Serum magnesium level was measured by spectrophotometric method. Magnesium intake was assessed by food frequency questionnaire. Anthropometric measurements were taken. The General Linear Model procedure was applied to determine the relationship of serum magnesium with quantitative variables. Results: Of the 119 patients, 23.5% of the patients had inadequate magnesium intake (lower than 67% of the recommended daily allowance), and 18.5% had hypomagnesemia. In patients with hypomagnesemia (< 0.75 mmol/l), serum levels of fasting plasma glucose (FPG), postprandial plasma glucose (PPG), and serum glycosylated hemoglobin (HbA1c) were higher compared to patients with normomagnesemia. FPG levels were significantly higher in patients with hypomagnesemia in Model 1 (179.0 +/- 64.9 vs. 148.7 +/- 52.0 mg/dl, p = 0.009) but the significance disappeared in other models. PPG levels were significantly higher in patients with hypomagnesemia in all models (287.9 +/- 108.4 vs. 226.8 +/- 89.4 mg/dl, p = 0.006 for Model 1, p = 0.027 for Model 2, p = 0.016 for Model 3). Serum HbA1c levels were significantly higher in patients with hypomagnesemia, and this significance proceeded (8.0 +/- 1.9% vs. 6.5 +/- 1.2%, p = 0.000 for all models). Body fat mass was significantly higher in patients with hypomagnesemia as compared to patients with normomagnesemia in model 3 (35.4 +/- 9.4 kg, 34.6 +/- 10.2 kg; p = 0.034). Dietary magnesium intake was not significantly associated with either metabolic parameters or anthropometric measurements. Conclusion: Hypomagnesemia in T2DM is directly associated with poor metabolic control. Clinical assessment should, therefore, focus on augmentation of magnesium status and adequate magnesium intake in patients with T2DM.