Atrial fibrillation (AF) is a common atrial arrhythmia for which there is no specific therapeutic drug. Quercetin (Que) has been used to treat cardiovascular diseases such as arrhythmias. In this study, we explored the mechanism of action of Que in AF using network pharmacology and molecular docking. The chemical structure of Que was obtained from Pubchem. TCMSP, Swiss Target Prediction, Drugbank, STITCH, Binding DB, Pharmmapper, CTD, GeneCards, DISGENET and TTD were used to obtain drug component targets and AF-related genes, and extract AF and normal tissue by GEO database differentially expressed genes by GEO database. The top targets were IL6, VEGFA, JUN, MMP9 and EGFR, and Que for AF treatment might involve the lipid and atherosclerosis pathway, the role of AGE-RAGE signaling pathway in diabetic complications, MAPK signaling pathway and IL-17 signaling pathway. In addition, molecular docking showed that Que binds strongly to key targets and is differentially expressed in AF. This study systematically elucidated the key targets of Que treatment for AF and the specific mechanisms, providing a new direction for further basic experimental exploration and clinical treatment.