The aim of this prospective observational study was to screen for risk factors of intraoperative atrial fibrillation (AF) during noncardiac thoracic surgery. The study was conducted as a single-institution study in Zhejiang Cancer Hospital, Hangzhou, China. All the participants were patients with cancer scheduled for thoracotomy.This study was conducted from July 2013 to August 2016 and included 144 patients scheduled for thoracotomy under general anesthesia. We collected the patients’ demographic and perioperative medical data in our hospital. AF was diagnosed using electrocardiography (ECG), on the basis of the presence of characteristic ECG features of AF by one or more ECG leads for at least 30 seconds.Of the participants, 144 completed the study and 18 developed intraoperative AF. Higher percentages of subjects in the AF group than in the non-AF group had histories of chemotherapy (P = .014) and alcohol consumption (P = .034) before surgery. The AF group had a lower mean body mass index (P = .019), significantly higher mean heart rate (P < .001), and lower tidal volume (P = .01) than the non-AF group. After the logistic regression analysis, only alcohol consumption (odds ratio [OR] = 5.279; 95% confidence interval [CI]: 1.432–19.467), history of chemotherapy (OR = 4.019; 95% CI: 1.504–15.334), and high heart rate (OR = 1.093; 95% CI: 1.033–1.156) during 1-lung ventilation were identified as the risk factors of AF during lung and esophageal surgeries.The incidence of intraoperative AF during noncardiac thoracic surgery was 12.5%. Alcohol consumption, history of chemotherapy, and high heart rate during 1-lung ventilation were the risk factors related to intraoperative AF.