Background Diabetes is a known risk factor for early postoperative complications. Even so, the incidence of acute postoperative complications following routine hernia surgery is seldom described, and the risk for reoperation for recurrence has hardly been studied. Our aim was to explore if diabetes is a significant risk factor for complications after inguinal hernia surgery. Methods All inguinal hernia repairs registered in the Swedish Hernia Register between 2002 and 2011 were identified. Information on comorbidity and postoperative complications was obtained through cross-referencing with the National Patient Register at the National Board of Health and Welfare. Complicated diabetes was defined as diabetes with secondary manifestations (corresponding to aDCSI >0). The hazards for postoperative complications and reoperation for recurrence after the index hernia operation were calculated. Results Altogether 162,713 inguinal hernia repairs on 143,041 patients were registered. Of these, the number of patients with diabetes was 4816 (3.4 %), including 1123 0.8 %) patients with complicated diabetes (aDCSI >0). A significantly increased risk for postoperative complications was observed up to 30 days after hernia surgery when adjusted for gender, age, BMI, history of liver disease, kidney disease or HIV/AIDS, type of hernia and surgical method (odds ratio 1.35, 95 % confidence interval 1.14-1.60). No significantly increased risk for reoperation up until December 31, 2011, was observed in either patient group. Conclusion Diabetes seems to increase the risk for postoperative complications within 30 days of inguinal hernia surgery, especially for complicated diabetes. Diabetes does not seem to increase the long-term risk for reoperation for recurrence.