Persons with diabetes undergo more surgical procedures, have a higher perioperative risk of complications, and have longer hospital stays than do persons who do not have diabetes. Persons with diabetes are frequently overweight, have a high prevalence of cardiovascular risk factors, and are more likely to suffer from chronic musculoskeletal conditions and traumatic injuries that require orthopaedic attention. Surgery frequently disrupts usual diabetes management, requiring adjustments to the treatment regimen. Suboptimal perioperative glucose control may contribute to increased morbidity, and it aggravates concomitant illnesses. Many patients undergoing elective or urgent orthopaedic surgery may have unrecognized diabetes or may develop stress-related hyperglycemia in the hospital. The challenge is to minimize the effects of metabolic derangements on surgical outcomes, reduce glycemic excursions, and prevent hypoglycemia. Recent guidelines advocate evidence-based glucose targets in the inpatient setting, and regimens for intravenous and subcutaneous insulin are gaining in popularity. Individualized treatment should be based on the ambient level of glycemic control, outpatient treatment regimen, presence of complications, nature of the surgical procedure, and type of anesthesia administered. Management by a multidisciplinary team and attention to discharge planning are key aspects of care during and after orthopaedic surgery.