Abstract Background Premature extra betas and supraventricular tachyarrhythmias are prevalent in the gestational period. Gestational diabetes mellitus (GDM) complicated a significant proportion of pregnancies worldwide. Purpose Given the high prevalence of cardiac arrhythmia (CA) among patients with diabetes, we aimed to investigate the association of CA with GDM. Methods This is a nationwide cohort study using the Korean Health Insurance database. We identified 1,113,729 women who gave birth between 2007 and 2015. After excluding subjects who did not undergo the national health screening test within a year before pregnancy, multi-pregnancy, and those with fasting blood glucose ≥126 mg/mL and/or diagnosed with diabetes before pregnancy CA was defined as atrial and ventricular premature beats, paroxysmal tachycardia, and atrial fibrillation. The primary outcome was the incidence of GDM. Subgroup analysis stratified by age and body mass index at pregnancy onset, and a history of hypertension before pregnancy were conducted. Results A total of 365,880 women were included in the final analysis. Of them, 3,253 (0.9%) had a diagnosis of CA. Subjects with CA were older at pregnancy onset (mean age 33.3±4.1 vs. 33.0±3.9 years, P<0.001), and had a higher proportion of hypertension (5.2% vs. 1.0%, P <0.001) than in subjects without CA. GDM was detected in 31,938 (8.7%) subjects and more commonly occurred in subjects with CA than those without (14.9% vs. 8.7%, P<0.001). After adjusting for confounding factors, the incidence of GMD was statistically significantly higher in those with CA (adjusted OR 1.78, 95% CI 1.615–1.970, P<0.001). Moreover, the relationship between CA with GDM was statistically significant regardless of age and body mass index (Figure 1). Meanwhile, despite a higher incidence of GDM, the association between CA and GDM was insignificant in subjects with a history of hypertension. Conclusion The risk of gestational diabetes was higher in subjects diagnosed with CA before or during pregnancy compared with those without CA.