Two national databases were analyzed to determine the effect of varying severity of diabetes mellitus (DM) on ventral hernia repair (VHR) outcomes. The National Surgical Quality Improvement Program (NSQIP) and the National Inpatient Sample (NIS) were queried for patients with and without DM who underwent elective VHR between 2005 to 2012 and 1998 to 2011, respectively. In addition, patients with insulin dependent versus noninsulin-dependent DM were compared in NSQIP; complicated and uncomplicated diabetics were compared in NIS. Univariate and multivariate analyses were used. In NSQIP, 25,819 of 219,625 patients undergoing VHR were diabetic. In open VHR (OVHR), DM patients had an increased complication rate (P < 0.0001); DM patients requiring insulin had increased odds of wound, minor, and major complications (P < 0.0001). For laparoscopic VHR (LVHR), insulin dependence did not affect complication rates (P > 0.05). In NIS, 45,248 of 238,627 patients undergoing VHR were diabetic. In OVHR, patients with complicated diabetes had higher rates of minor complications (17.3% vs 12.7%, P < 0.0001) and had 58 per cent greater odds of major complications than patients with uncomplicated diabetes. LVHR had no difference in complications for complicated versus uncomplicated DM (P > 0.05). After multivariate analysis, insulin-dependent or complicated DM undergoing OVHR had significantly worse outcomes compared with noninsulin-dependent and uncomplicated diabetics. Preoperative optimization and LVHR should be considered in diabetic patients.