Background: Glucose variability is common among hospitalized patients, but the prognostic implications among patients hospitalized in surgical wards are unknown. The objective of this study was to investigate the association between glucose variability, length of stay, and mortality. Methods: Historical prospectively collected data of patients ≥18 years of age, hospitalized in general surgery wards between January 2011 and December 2017. Glucose variability was assessed by coefficient of variance and standard deviation of glucose values during hospitalization. The main outcomes were length of stay and 30-day and end-of-follow-up mortality. Results: The cohort included 8,894 patients (mean age 63 ± 19 years, 48% male, mean follow-up 3.0 ± 1.8 years). A total of 2,012 (23%) patients had diabetes mellitus. The mean length of stay was longer with a higher coefficient of variance or standard deviation in patients without and with diabetes mellitus. The 30-day mortality was 6%, associated with a higher versus a lower coefficient of variance (9% vs 3%) and standard deviation (9% vs 3%) in patients without diabetes mellitus and with diabetes mellitus (9% vs 5%; 8% vs 5%, respectively). Mortality at the end of follow-up was increased in patients without diabetes mellitus with a higher coefficient of variance (27% vs 18%) and standard deviation (29% vs 17%) and in patients with diabetes mellitus (33% vs 24% and 32% vs 21%, respectively). Multivariate analysis indicated an increased risk for 30-day and end-of-follow-up mortality, in both groups. Adjustment for glucocorticoid treatment or hypoglycemia did not affect the results. In patients with a high or low coefficient of variance, mortality was higher with median glucose levels during hospitalization ≥180 mg/dl, compared with <180 mg/dl. Conclusion: In patients with and without diabetes mellitus hospitalized in general surgery wards, increased glucose variability is associated with longer hospitalization and increased short-term and long-term mortality.