We have evaluated the extent to which diabetes affects the revision rate following total hip replacement (THR). Through the Danish Hip Arthroplasty Registry we identified all patients undergoing a primary THR (n = 57 575) between 1 January 1996 and 31 December 2005, of whom 3278 had diabetes. The presence of diabetes among these patients was identified through the Danish National Registry of Patients and the Danish National Drug Prescription Database. We estimated the relative risk for revision and the 95% confidence intervals for patients with diabetes compared to those without, adjusting for the confounding factors. Diabetes is associated with an increased risk of revision due to deep infection (relative risk = 1.45 (95% confidence interval 1.00 to 2.09), particularly in those with type 2 diabetes (relative risk = 1.49 (95% confidence interval 1.02 to 2.18)), those with diabetes for less than five years prior to THR (relative risk = 1.69 (95% confidence interval 1.24 to 2.32)), those with complications due to diabetes (relative risk = 2.11 (95% confidence interval 1.41 to 3.17)), and those with cardiovascular comorbidities prior to surgery (relative risk = 2.35 (95% confidence interval 1.39 to 3.98)). Patients and surgeons should be aware of the relatively elevated risk of revision due to deep infection following THR in diabetes particularly in those with insufficient control of their glucose level.