Direct oral anticoagulants (DOACs) are widely used for stroke prevention in atrial fibrillation. However, they have a bleeding complication. Breast cancer resistance protein, encoded by ABCG2, is known to be an efflux transporter of apixaban and rivaroxaban among DOACs. This study aimed to investigate the association between gene variants and bleeding complications during treatment with ABCG2 substrates (apixaban and rivaroxaban). Patients treated with apixaban and rivaroxaban were enrolled from June 2018 to December 2021. Five single nucleotide polymorphisms (SNPs) of ABCG2 were selected. Previously studied genes (ABCB1, CYP3A4, and CYP3A5) were further analyzed as possible confounders. Finally, a total of 16 SNPs were examined in this case-control study. The outcome was defined as major bleeding and clinically relevant non-major bleeding. Two models were constructed using the multivariable analysis. Among 293 patients, 64 were cases. The mean age of the patients was 68.8 years, and males comprised 62.5% of the study population. Model I revealed that a history of bleeding, concurrent use of proton pump inhibitor (PPI), ABCG2 rs3114018, and ABCB1 rs1045642 were significantly associated with bleeding complications; the AORs (95% CI) were 6.209 (2.210-17.442), 2.385 (1.064-5.349), 2.188 (1.156-4.142), and 3.243 (1.371-7.671), respectively. Model II showed that modified HAS-BLED score, concurrent use of PPI, ABCG2 rs3114018, and ABCB1 rs1045642 were significantly associated with bleeding complications. The modified HAS-BLED score, a history of bleeding, concurrent use of PPI, ABCG2 rs3114018, and ABCB1 rs1045642 were significantly associated with the risk of bleeding complications in patients on apixaban and rivaroxaban, after adjusting for other confounders. These findings can be used to develop individualized treatment strategies for patients taking apixaban and rivaroxaban.