Objective To investigate the relationship between two-lung ventilation (TLV) with single-lumen endotracheal tube (SLT), one-lung ventilation (OLV) with double-lumen endotracheal tube (DLT) and postoperative pulmonary complications (PPCs) after total thoracoscopic cardiac surgery. Methods The clinical data of patients who underwent totally thoracoscopic cardiac surgeries in the Guangdong Provincial People’s Hospital from October 2019 to October 2021 were retrospectively analyzed. The patients were divided into 2 group according to the type of endotracheal tube, including a SLT group and a DLT group. Baseline data, surgical variables and PPCs were compared. The influencing factors of PPCs in the two groups were analyzed by binary logistic regression analysis. Results Finally 349 patients were enrolled, including 180 males and 169 females with an average age of (50.0±14.8) years. There were 219 patients in the SLT group and 130 patients in the DLT group. There was no statistical difference in baseline data, surgical variables or PPCs between the two groups (P>0.05). Binary logistic regression analysis showed that PPCs were related to body mass index in the SLT group (OR=0.778, 95%CI 0.637 to 0.951, P=0.014) and preoperative smoking history in the DLT group (OR=0.058, 95%CI 0.004 to 0.903, P=0.042). Conclusion For the patients who undergo totally thoracoscopic cardiac surgery, TLV with SLT and OLV with DLT show no significant association with PPCs. At the same time, PPCs are associated with body mass index in the SLT group, while associated with preoperative smoking history in the DLT group.