Diabetic retinopathy (DR) is the major cause of visual impairment in the working-age population with type 2 diabetes mellitus (T2DM). Magnesium (Mg) is involved in various metabolic processes and in experimental animal studies; Mg has shown essential roles in physiological eye function. Magnesium deficiency is common in T2DM; therefore we analyzed the association between serum Mg status and the presence of DR in T2DM patients. Systematic literature searching in several databases, from 1988 to September 2020, was performed using search terms: “serum magnesium” or “hypomagnesemia” and “diabetic retinopathy” or “retinopathy”. A total of 3,227 patients from 17 studies were included in this meta-analysis. Hypomagnesemia was associated with increased risk of developing DR (OR 4.52 [2.08, 9.81], p=0.0001) in T2DM patients. Serum Mg levels also lower in patients with DR than those without DR (MD –0.30 mg/dL [–0.44, –0.15], p<0.0001). Additionally, serum Mg levels were lower in patients with proliferative DR (PDR) than those with non-proliferative DR (NPDR) (MD-0.21 mg/dL [–0.34, –0.09], p=0.0009). Leave-one-out sensitivity analysis did not change the overall effect. Hypomagnesemia or low serum Mg levels in T2DM patients increased the risk of developing DR.