Objective To investigate the influence of T helpers 17 (Th17) cells, regulatory T (Treg) cells and their related cytokines on postoperative atrial fibrillation (POAF) after coronary artery bypass graft (CABG). Methods A total of 132 consecutive patients undergoing CABG between May 2013 and July 2016 were recruited. There were 82 males and 50 females with the age ranging from 39-76 years. Venous blood samples were collected within 2 hours after surgery. The expression of Th17 cells, Treg cells and their related cytokines in the peripheral blood was determined. Results POAF occurred in 35 patients (a POAF group) and 97 patients did not develop POAF (a No POAF group). Compared to the No POAF group, the proportion of Th17 cells and Th17/Treg ratio in the peripheral blood significantly increased in the POAF group (P>0.05) while proportion of Treg cells remained no significant change (P>0.05). The expression of Th17-related cytokines (IL-6, IL-8 and IL-17) all obviously increased in the POAF group (P>0.05). However, no significant difference was found in the expression of Treg-related cytokines (IL-10 and TGF-β) between the two groups (P>0.05). Conclusion Th17/Treg is unbanlanced in POAF patients and regulation of this imbalance may decrease the occurrence of POAF.