Atrial fibrillation (AF) increases the risk of ischemic stroke and systemic arterial embolism. However, the risk factors or predictors of stroke in AF patients have not been clarified. Therefore, it is necessary to find effective diagnostic and therapeutic targets. Two datasets were downloaded from the Gene Expression Omnibus (GEO) database. Differently expressed genes (DEGs) were identified between samples of atrial fibrillation without stroke and atrial fibrillation with stroke. Enrichment analysis of Gene Ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) by Gene Set Enrichment Analysis (GSEA), construction and analysis of protein-protein interaction (PPI) network and significant module, and the receiver operator characteristic (ROC) curve analysis were performed. A total of 524 DEGs were common to both datasets. Analysis of KEGG pathways indicated that the top canonical pathways associated with DEGs were ubiquitin-mediated proteolysis, endocytosis, spliceosome, and so on. Ten hub genes (SMURF2, CDC42, UBE3A, RBBP6, CDC5L, NEDD4L, UBE2D2, UBE2B, UBE2I, and MAPK1) were identified from the PPI network and were significantly associated with a diagnosis of atrial fibrillation and stroke (AFST). In summary, a total of 524 DEGs and 10 hub genes were identified between samples of atrial fibrillation without stroke and atrial fibrillation with stroke. These genes may serve as the target of early diagnosis or treatment of AF complicated by stroke.