Background: Atrial fibrillation (AF) is the most common cardiac arrhythmia. The effectiveness and mechanism of edoxaban in preventing stroke after atrial fibrillation remain unclear.Methods: The expressions of HBG1 and HBD in red blood cells were tested in AF. Sixty C57B/6J mice were randomly divided into the following groups: the control (CON) group, atrial fibrillation (AF) group, AF + edoxaban group, and AF + rivaroxaban group. H&E staining assay and reticular fiber staining were performed. Myocardial fibrosis was evaluated by the Masson staining assay, Sirius red staining assay, and immunohistochemical assay for the expressions of α-SMA and COL1A1. ELISA and RT-PCR assay were performed for the detection of inflammatory parameters (TNF-α, IL-1β, IL-6, and IL-10). Blood lipids were detected by using the Beckman automatic biochemical analyzer. Furthermore, four items of coagulation were detected, and molecular docking among HBG1, HBD, and MASP1 (Xa) was performed by PyMOL 2.1 software. The BP neural network model, cubic spline interpolation, and support vector machine model were constructed to predict prothrombin time based on HBG1 and HBD expressions. COIP assay was performed to construct the interaction between HBG1 and HBD. The functional enrichment analysis was performed by DAVID and Metascape tools.Results: The expressions of HBG1 and HBD in red blood cells of the patients with atrial fibrillation were decreased. The results showed a lower level of hemoglobin in red blood cells with HBG1-siRNA and HBG1-siRNA. Compared with the AF group, the collagen fiber percentage in the AF + edoxaban group was decreased (p < 0.05). After using edoxaban, the expressions of TNF-α, IL-1β, IL-6, and IL-10 were significantly decreased (p < 0.05). The LDL-C, TC, and TG levels were downregulated in the AF + edoxaban group. The PT and APTT levels in the AF + edoxaban group were more increasing than in the AF mice (p < 0.05). Compared with the AF group, the expressions of HBG1 and HBD were downregulated in the AF + edoxaban group (p < 0.05). HBG1 protein matched well with HBD and MASP1(Xa) protein surfaces. There exists a significant interaction between HBG1, HBD, and PT via the BP neural network and support vector machine. Enrichment analysis showed that HBG1 and HBD were mainly enriched in blood coagulation.Conclusion: Edoxaban could prevent atrial fibrillation and coagulation by reducing inflammation, lipids, and fibrosis via HBG1/HBD biomarkers effectively, and the effect was superior to that of rivaroxaban.