Postoperative infection is a common healthcare-associated problem, and unfortunately, a serious complication in cardiac surgery patients. Toll-like receptors (TLRs) are crucial in activating non-specific immunity mechanisms and integrating elements of the immune system, due to interactions between specific and non-specific responses. In this study, the association of TLR2 or TLR4 with the risk of postoperative infections in cardiac surgery patients undergoing a coronary artery bypass grafting (CABG) procedures was investigated. Our research was carried out on a cohort of 299 consecutive adult patients with ischemic heart disease (IHD) who underwent a planned CABG procedure. These patients were monitored for the presence of a postoperative infection over a 30-day observation period. All patients were investigated for 2 TLR2 gene mutations - R753Q (rs5743708) and T16934A (rs4696482), and 2 polymorphisms of the TLR4 gene - D299G (rs4986790) and T399I (rs4986791). The final stage of the study was an evaluation of the hypothetical association between TLR2 and TLR4 gene variances and postoperative infections in patients undergoing CAGB procedures. The prevalence of infections in the final cohort was 15.3% (46/299). The most common infections were surgical site infections, which were diagnosed in 21 patients (45.6%), bloodstream infections in 15 patients (32.6%) and pneumonia in 10 patients (21.8%). Logistic regression demonstrated that the presence of the AG+GG of D299G (rs4986790) and CT+TT of T399I (rs4986791) variants was related to a higher incidence of infection in patients undergoing CAGB procedures. To our knowledge, this is the first study of its kind to demonstrate that TLR2 and TLR4 mutations affect the risk of post-CABG infections. Being a carrier of the AG+GG of D299G (rs4986790) or CT+TT of T399I (rs4986791), TLR4 variants constitute a postoperative risk factor for infection in patients undergoing CAGB procedures.