Background Intensive insulin therapy to maintain normoglycemia after cardiac surgery reduces morbidity and mortality. We investigated the magnitude and duration of hyperglycemia caused by dexamethasone administered after cardiopulmonary bypass. Methods A single-center before-after cohort study was performed. All consecutive patients undergoing coronary artery bypass grafting with cardiopulmonary bypass during a 6-month period were included. Insulin administration was guided by a sliding scale protocol. Halfway the observation period, the dexamethasone protocol was changed. The single dose (1D) group received a pre-operative dose of dexamethasone of 1 mg/kg. The double dose group (2D) received an additional dose of 0.5 mg/kg of dexamethasone post-operatively at ICU admission. Results We included 116 patients in the 1D group and 158 patients in the 2D group. There were no significant baseline differences between the groups. Median Euroscore was 5. In univariable analysis, the glucose level was different between groups 1D and 2D at 4, 6, 9, 12 and 24 hours after ICU admission (all p < 0.001). Insulin infusion was higher in the 1D group. Corrected for insulin dose in multivariable linear analysis, the difference in glucose between the 1D and 2D groups was 1.5 mmol/L (95% confidence interval 1.0–2.0, p < 0.001) 12 hours after ICU admission. Conclusion Dexamethasone exerts a hyperglycemic effect in cardiac surgery patients. Patients receiving high-dose corticosteroid therapy should be monitored and treated more intensively for hyperglycemic episodes.