Background: Diabetic retinopathy irreversibly leads to blindness. Early detection and stringent glycemic control may delay progression but there are no specific biomarkers. Serum magnesium has been found to be associated with retinopathy. Objective: To evaluate serum magnesium concentration in patients with type 2 diabetes and to study its association with stages of diabetic retinopathy. Methods: Cross section observational study at a tertiary care hospital. Diabetic retinopathy graded as per early treatment diabetic retinopathy study (ETDRS) and diabetes defined as per American diabetic association criteria. Patients with end stage diabetes and those on drugs affecting serum magnesium excluded. Results: Patients evaluated after exclusion were 300. The prevalence of hypomagnesemia was 21.3%. The prevalence of retinopathy in hypomagnesemia was 39% and in normal serum magnesium was 17.8%, respectively. The mean serum magnesium levels in type to diabetics without retinopathy, NPDR, diabetic maculopathy, pre-proliferative DR and PDR were 2.1±0.4, 2±0.3, 1.9±0.42, 1.8±0.4 and 1.4±0.07 mg/dl, respectively. Proliferative and pre-proliferative DR was significantly higher in patients with hypomagnesemia. Type 2 diabetics with hypomagnesemia has significantly more ACR>30mg/g than diabetics with normal serum magnesium (Chi-square test, P=0.001). There was a significant and inverse correlation between serum magnesium and ACR (Pearson’s correlation coefficient, r= -0.569, P<0.001). There was a significant and inverse correlation between serum magnesium and HbA1c (Pearson’s correlation coefficient, r= -0.551, P<0.001). Conclusion:Serum magnesium correlates significantly with HBA1c and albumin creatinine ratio and either alone or in combination may be used as a marker for risk and follow-up of patients with diabetic retinopathy.