Background: Dingji Fumai Decoction (DFD), a traditional herbal mixture, has been widely used to treat arrhythmia in clinical practice in China. However, the exploration of the active components and underlying mechanism of DFD in treating atrial fibrillation (AF) is still scarce.Methods: Compounds of DFD were collected from TCMSP, ETCM, and literature. The targets of active compounds were explored using SwissTargetPrediction. Meanwhile, targets of AF were collected from DrugBank, TTD, MalaCards, TCMSP, DisGeNET, and OMIM. Then, the H-C-T-D and PPI networks were constructed using STRING and analyzed using CytoNCA. Meanwhile, VarElect was utilized to detect the correlation between targets and diseases. Next, Metascape was employed for systematic analysis of the mechanism of potential targets and protein complexes in treating AF. AutoDock Vina, Pymol, and Discovery Studio were applied for molecular docking. Finally, the main findings were validated through molecular biology experiments.Results: A total of 168 active compounds and 1,093 targets of DFD were collected, and there were 89 shared targets between DFD and AF. H-C-T-D network showed the relationships among DFD, active compounds, targets, and AF. Three functional protein complexes of DFD were extracted from the PPI network. Further systematic analysis revealed that the regulation of cardiac oxidative stress, cardiac inflammation, and cardiac ion channels were the potential mechanism of DFD in treating AF. Addtionally, molecular docking verified the interactions between active compounds and targets. Finally, we found that DFD significantly increased the level of SIRT1 and reduced the levels of ACE, VCAM-1, and IL-6.Conclusions: DFD could be utilized in treating AF through a complicated mechanism, including interactions between related active compounds and targets, promoting the explanation and understanding of the molecular biological mechanism of DFD in the treatment of AF.