Abnormal P-wave axis may reflect preclinical atrial dysfunction and has been associated with an increased risk of incident atrial fibrillation (AF) in the general population. Patients with diabetes mellitus (DM) have a higher prevalence of AF, but the association of abnormal P-wave axis and the risk of incident AF in those with diabetes has not been previously explored. For this analysis, we included 8,965 eligible participants from the Action to Control Cardiovascular Risk in Diabetes (ACCORD) trial. P-wave axis was automatically measured on study electrocardiogram and visually confirmed, with the normal range being between 0° and 75°. At baseline, 8% of the study population had an abnormal P-wave axis. During 43,856 person-years of follow-up, there were 145 cases of incident AF. Using multivariable-adjusted Cox proportional hazards models, participants with abnormal P-wave axis had an increased risk of incident AF (hazard ratio 2.65, 95% confidence interval 1.76 to 3.99, p < 0.0001). Findings were similar in prespecified subgroups, without evidence of effect modification. Both left- and right-axis deviation of the P-wave were associated with incident AF. Our results suggest that abnormal P-wave axis is associated with incident AF in those with DM and that this relation is conserved in prespecified subgroups. There may be utility in considering P-wave axis values from routine ECGs in these patients.