Objective: This study aimed to explore and analyze the factors affecting the incidence of pneumonia after coronary artery bypass grafting (CABG) to provide reference for the prevention of such situation. Methods: A total of 500 patients who underwent CABG in a hospital were selected. From March 2019 to March 2022, 410 patients without pneumonia and 90 patients with pneumonia were divided into groups A and B. The influencing factors and pathogen composition of postoperative pneumonia were discussed and analyzed. Results: Univariable analysis results showed that age, cardiac function grade, occurrence of smoking, operation time, tracheal intubation time, suspended red-blood-cell transfusion and hospital stay in group B were higher than those in group A. Multivariable logistic analysis results showed that operation time, smoking history, and tracheal intubation time were risk factors for pneumonia after CABG. Among the 90 patients with postoperative pneumonia, 90 had pathogens, 81 had Gram-negative bacteria, 4 had Gram-positive bacteria, and 5 had fungi. Conclusions: Patients after CABG were more likely to develop pneumonia. Operation time, smoking history, and tracheal intubation time were the risk factors of pneumonia after CABG. Most of these patients had Gram-negative bacteria. Patient intervention based on the influencing factors can effectively prevent the occurrence of postoperative pneumonia.