Background: Inpatient dysglycemia is associated with increased morbidity, mortality and cost. Medical education must not only address knowledge gaps, but also improve clinical care. Methods: All 129 medicine residents at a large academic medical center were offered a case-based online curriculum on the management of inpatient dysglycemia in the fall of 2009. First-year residents took a 3-h course with 10 modules. Second and third-year residents, who had been educated the prior year, underwent abbreviated training. All residents were offered a 20-min refresher course in the spring of 2009. We assessed resident knowledge, resident confidence, and patient glycemia on two teaching wards before and after the initial intervention, as well as after the refresher course. Results: A total of 117 residents (91%) completed the initial training; 299 analyzed admissions generated 11 089 blood glucose values and 4799 event blood glucose values. Admissions with target glycemia increased from 19.4% to 33.0% (P = 0.035) by the end of the curriculum. There was a strong downward trend in hyperglycemia from 22.4% to 11.3% (P = 0.055) without increased hypoglycemia. Confidence and knowledge increased significantly among first-time and repeat participants. Residents rated the intervention as highly relevant to their practice and technologically well implemented. Conclusion: Optimization of an online curriculum covering the management of inpatient glycemia over the course of 2 years led to significantly more admissions in the target glycemia range. Given its scalability, modularity and applicability, this web-based educational intervention may become the standard curriculum for the management of inpatient glycemia.