Background: We aimed to investigate the effects of cardiopulmonary bypass (CPB) on pulmonary function under the conditions of one-lung ventilation (OLV) and carbon dioxide pneumothorax in robotic cardiac surgery. Methods: Ninety-eight patients underwent robotic cardiac surgery using the da Vinci Surgical System, including 58 on-pump surgeries and 40 off-pump surgeries. Respiratory parameters and arterial blood gases were assessed at the following time points: 25 min after the induction of anesthesia under two-lung ventilation (T1), 25 min after OLV (T2), 25 min after the termination of CPB under OLV in the on-pump group or 25 min after the main surgery intervention in the off-pump group (T3) and 20 min before the end of surgery (T4). Dynamic lung compliance (C-dyn), alveolar-arterial PO2 difference (PA-aDO2), oxygenation index (OI) and artery-alveolar O-2 pressure ratio (a/A) were calculated. Results: No significant differences in pulmonary function parameters between T2 and T3 were observed in the off-pump group. However, in the on-pump group, compared with those at T2, PETCO2, P-peak, PaCO2 and PA-aDO2 at T3 were higher, whereas SpO(2), C-dyn, PaO2, OI and a/A were lower (p<0.05). Comparisons between the two groups at T3 indicated that SpO(2), C-dyn, PaO2, OI and a/A were higher, while P-peak, PaCO2 and PA-aDO2 were lower in the off-pump group (p<0.01). Conclusions: In robotic cardiac surgery under the conditions of OLV and carbon dioxide pneumothorax, CPB worsened pulmonary function and tolerance to OLV and carbon dioxide pneumothorax.