The present study aimed to assess the changes in the immunological parameters of patients undergoing cardiac surgery with cardiopulmonary bypass (CPB). The serum or plasma samples of patients were assessed to determine the concentrations of IL-6, one of the major proinflammatory cytokines (seven females and six males), and selected classes of immunoglobulins (six females and seven males). The samples for ELISA (enzyme-linked immunosorbent assay) were collected from patients before the use of CPB, at 60 min of the use of CPB, and at 24 h after the surgery. After 24 h of the surgery, IL-6, IgM, and IgG concentrations were higher in the serum of female patients than in the serum of male patients. However, compared to female patients, male patients showed a significant increase in IgG3 concentration after 24 h of the surgery. Regardless of age, the levels of the analyzed classes of immunoglobulins were similar in all patients. Additionally, in both age groups, a significant increase in the serum IL-6 concentration was observed after the first postoperative day, and this increase was more pronounced in patients diagnosed to have postoperative infections. The serum IL-6 concentration can serve as a potential marker of pathogenic infections in patients undergoing cardiac surgery with CPB and is thus useful for the early diagnosis of postoperative infections.