To evaluate the effect of preoperative statin treatment on the outcome of primary vitrectomy in type 1 and 2 diabetic patients. In this open, observational institutional study, a total of 192 eyes of 171 type 1 and 2 adult diabetic patients admitted for primary vitrectomy for management of sight-threatening forms of diabetic retinopathy were divided according to the use of lipid-lowering therapy: those with statin treatment (79 eyes of 73 patients) and those taking no statin medication (113 eyes of 98 patients). One-month best-corrected visual acuity (BCVA) gain and cumulative 12-month revitrectomy frequency were analyzed. In multivariate linear regression, diabetic patients with statin treatment had a better 1-month BCVA improvement than did those without statin treatment (absolute difference 0.26, 95% confidence interval [CI] 0.02-0.50, p = 0.028). Subgroup analysis revealed that diabetic patients on statin had better postoperative BCVA improvement when preoperative status included partial or panretinal laser photocoagulation (p = 0.042 and p = 0.049) and anti-vascular endothelial growth factor therapy (p = 0.011). Moreover, diabetic patients with preoperative macular edema (p = 0.009), vitreous hemorrhage (p<0.001), proliferative retinopathy (p<0.001), or tractional retinal detachment (p = 0.010) had better BCVA recovery if receiving statin. In Cox proportional hazards regression model, revitrectomies in our 12-month follow-up were less frequent in diabetic patients on statin treatment (hazard ratio 0.28, 95% CI 0.08-0.93, p = 0.037). These data provide novel insight into the potential clinical benefit for patients with sight-threatening diabetic retinopathy undergoing vitrectomy treated with statin.