Objective: We aimed to investigate the relationship between cardiac arrhythmias and the incidence of gestational diabetes (GDM). Design and method: This retrospective cohort study utilized data from the Korean Health Insurance Service database, encompassing 1,113,729 women who gave birth between January 2007 and December 2015. We excluded subjects who had not undergone the national health screening test within 1 year before pregnancy (n=723,575), those with multifetal pregnancies (n=17,683), and individuals diagnosed with diabetes (ICD-10 codes E08, E09, E10, E11, and E13) and/or those with a fasting blood glucose level of 126 mg/dL or higher at the health screening test conducted within 1 year before pregnancy (n=6,591). Arrhythmias were classified into 5 categories: lethal arrhythmias, premature beats, paroxysmal tachycardia, atrial flutter/fibrillation, and atrioventricular block. The primary outcome was incident GDM, which was defined as having at least 1 claim with ICD-10 codes of O244 or O249 and the use of insulin during pregnancy, or having at least 3 claims with ICD-10 codes of O244 or O294. Results: We analyzed 365,880 singleton pregnancies without a history of diabetes. Of these, 3,253 (0.9%) had cardiac arrhythmias, including premature extra beats, supraventricular tachyarrhythmias, and/or atrial flutter/fibrillation. GDM occurred in 31,938 (8.7%) subjects during pregnancy and was more prevalent in women with cardiac arrhythmia than in those without (14.9 vs. 8.7%, p<0.001). In the multivariate analysis, the association between cardiac arrhythmia and GDM remained statistically significant (adjusted odds ratio, 1.78; 95% confidence interval, 1.61 to 1.97; p<0.001). Subgroup analysis revealed that the risk of GDM was consistently statistically significant in subjects with cardiac arrhythmia, regardless of age, body mass index, and the presence or absence of chronic hypertension. Conclusions: Cardiac arrhythmias before and during pregnancy appear to be associated with an increased risk of developing GDM.