ABSTRACT: Currently, the potential risk of atrial fibrillation associated with antihyperglycemic drug use has been a topic of considerable interest. However, it remains uncertain whether different classes of antihyperglycemic drug therapy are associated with the risk of atrial fibrillation risk. Here, we investigated the association between different classes of antihyperglycemic drugs and new-onset atrial fibrillation (NAF). A case-matched study was performed based on the National Health Insurance Program in Taiwan. Patients who had NAF were considered the NAF group and were matched in a 1:4 ratio with patients without NAF, who were assigned to the non-NAF group. Patients were matched according to sex, age, diabetes mellitus duration, index date, and Charlson Comorbidity Index score. We used multivariate logistic regression controlling for potential confounders to examine the association between different classes of antihyperglycemic drug use and the risk of NAF. Overall, we identified 2,882 cases and 11,528 matched controls for the study. After adjusting for sex, age, comorbidities, and concurrent medications, users of biguanides or thiazolidinediones were at a lower risk of developing NAF when compared with non-users (odds ratio [OR] 0.81, 95% confidence interval [CI] 0.71-0.95 and OR 0.72, 95% CI 0.63-0.83, respectively). In contrast, users of insulin were at a higher risk of developing NAF than were non-users (OR 1.19, 95% CI 1.06-1.35). Sulfonylureas, glinides, α-glucosidase inhibitors, and dipeptidyl peptidase-4 inhibitors were not associated with developing the risk of NAF. In conclusion, the use of biguanides or thiazolidinediones may be associated with a low risk of NAF, whereas insulin may be associated with a significant increase in the risk of NAF in patients with type 2 diabetes mellitus during long-term follow-up. Further prospective randomized studies should investigate which specific class of antihyperglycemic drug treatment for diabetes mellitus can prevent or postpone NAF.