Atrial fibrillation (AF) is the most common form of cardiac arrhythmia and significantly increases the risks of morbidity, mortality and health care expenditure; however, treatment for AF remains unsatisfactory due to the complicated and incompletely understood underlying mechanisms. In the present study, weighted gene co-expression network analysis (WGCNA) was conducted to identify key modules and hub genes to determine their potential associations with AF. WGCNA was performed in an AF dataset GSE79768 obtained from the Gene Expression Omnibus, which contained data from paired left and right atria in cardiac patients with persistent AF or sinus rhythm. Differentially expressed gene (DEG) analysis was used to supplement and validate the results of WGCNA. Gene Ontology and Kyoto Encyclopedia of Genes and Genomes enrichment analyses were also performed. Green and magenta modules were identified as the most critical modules associated with AF, from which 6 hub genes, acetyl-CoA Acetyltransferase 1, death domain-containing protein CRADD, gypsy retrotransposon integrase 1, FTX transcript, XIST regulator, transcription elongation factor A like 2 and minichromosome maintenance complex component 3 associated protein, were hypothesized to serve key roles in the pathophysiology of AF due to their increased intramodular connectivity. Functional enrichment analysis results demonstrated that the green module was associated with energy metabolism, and the magenta module may be associated with the Hippo pathway and contain multiple interactive pathways associated with apoptosis and inflammation. In addition, the blue module was identified to be an important regulatory module in AF with a higher specificity for the left atria, the genes of which were primarily correlated with complement, coagulation and extracellular matrix formation. These results suggest that may improve understanding of the underlying mechanisms of AF, and assist in identifying biomarkers and potential therapeutic targets for treating patients with AF.