Hyperglycemia in hospitalized patients is associated with increased morbidity and mortality. Postoperative infections are particularly common in the setting of perioperative hyperglycemia; however, the relationship between perioperative glucose levels and the innate immune system remains unclear. Immune cells, monocytic respectively T cell function and T cell subspecies of 32 patients after esophageal or pancreatic resection were analyzed preoperatively and on the first day after surgery (POD 1). Perioperative blood glucose was measured hourly via arterial blood gas analyses. Groups were classified by maximum perioperative glucose levels: <180 mg/dL versus at least one episode of ≥180 mg/dL. The suppression of immune cells and cytokines was defined as the difference between pre- and postoperative values. In perioperative hyperglycemic patients, preoperative CD4+/CD8+ ratio (P=0.039), count of CD4+ T cells (P=0.039) and release of IFN-γ (P=0.013) and TNF-α (P=0.045) after ex-vivo T cell stimulation of whole blood were significantly higher. Furthermore, the postoperative count of basophils was significantly lower (P=0.011), HLA-DR expressing CD8- T cells were tendentially lower (P=0.058) and more suppressed (P=0.035). The suppression of IFN-γ (P=0.003) and TNF-α (P=0.006) was significantly higher in these patients after ex-vivo T cell stimulation but absolute values were similar between the groups. IL-10 release of lipopolysaccharide-stimulated whole blood was tendentially more suppressed after perioperative hyperglycemia (P=0.084). Severe perioperative hyperglycemia attenuated postoperative basophil count, T cell activation and monocytic function. These patients were also at preoperative higher immune activation.