The effect of magnesium (Mg) deficiency on the prevalence of diabetes and diabetic complications has received a great attention. The present study investigated the association of Mg level in the serum or urine of the patients, lived in the Northeast areas of China, with either pre-diabetes or diabetes with and without complications. From January 2010 to October 2011, patients with type 1 diabetes (T1D, n = 25), type 2 diabetes (T2D, n = 137), impaired fasting glucose (IFG, n = 12) or impaired glucose tolerance (IGT, n = 15), and age/gender matched control (n = 50) were enrolled in the First Hospital of Jilin University. In T2D group, there were 24, 34, and 50 patients with nephropathy, retinopathy or peripheral neuropathy. Serum Mg levels in the patients with IGT, IFG, T2D, and T1D were significantly lower than that of control. The urinary Mg levels were significantly increased only in T2D and T1D patients compared to control. There was no difference for these two changes among T2D with and without complications; In addition, there was a significantly positive correlation of serum Mg levels with serum Ca levels only in T2D patients, and also a significantly positive correlation of urinary Mg levels with urinary Ca levels in control, IGT patients, and T2D patients. Simvastatin treatment in T2D patients selectively reduced serum Ca levels and urinary Mg levels. These results suggest that the potential impact of Mg deficiency on metabolic syndrome, diabetes and diabetic complications needs to be received special attention.