Artificial intelligence (AI) models applied to 12-lead ECG waveforms can predict atrial fibrillation (AF), a heritable and morbid arrhythmia. However, the factors forming the basis of risk predictions from AI models are usually not well understood. We hypothesized that there might be a genetic basis for an AI algorithm for predicting the 5-year risk of new-onset AF using 12-lead ECGs (ECG-AI)-based risk estimates. We applied a validated ECG-AI model for predicting incident AF to ECGs from 39 986 UK Biobank participants without AF. We then performed a genome-wide association study (GWAS) of the predicted AF risk and compared it with an AF GWAS and a GWAS of risk estimates from a clinical variable model. In the ECG-AI GWAS, we identified 3 signals (P<5×10-8) at established AF susceptibility loci marked by the sarcomeric gene TTN and sodium channel genes SCN5A and SCN10A. We also identified 2 novel loci near the genes VGLL2 and EXT1. In contrast, the clinical variable model prediction GWAS indicated a different genetic profile. In genetic correlation analysis, the prediction from the ECG-AI model was estimated to have a higher correlation with AF than that from the clinical variable model. Predicted AF risk from an ECG-AI model is influenced by genetic variation implicating sarcomeric, ion channel and body height pathways. ECG-AI models may identify individuals at risk for disease via specific biological pathways.