Comparing direct oral anticoagulants (DOACs) and warfarin's efficacy and safety in patients with nonvalvular atrial fibrillation (AF) and liver cirrhosis (LC). Evidence of the pharmacodynamics of DOACs is limited in patients with AF and LC. A retrospective cohort study was conducted in the largest hospital system in Taiwan, involving patients with AF and LC for the years 2012 to 2021. Hazards of thromboembolic events (ischemic stroke, transient ischemic attack, and systemic embolism), intracranial hemorrhage, gastrointestinal, major bleeding, and all-cause mortality were investigated with a new-user, active comparator design. Inverse probability of treatment weighting was applied to balance potential confounders between treatment groups. In total, 478 DOAC users and 247 warfarin users were included. DOACs and warfarin demonstrated similar trends in preventing thromboembolic events, namely ischemic stroke [adjusted hazard ratio (aHR), 1.05 (95% CI: 0.42-2.61)], transient ischemic attack [aHR, 1.36 (95% CI: 0.18-10.31)], and systemic embolism [aHR, 0.49 (95% CI: 0.14-1.70)]. DOAC use was associated with a similar risk of intracranial hemorrhage [aHR, 0.65 (95% CI: 0.26-1.59)] and gastrointestinal bleeding [aHR, 0.64 (95% CI: 0.39-1.03)], a decreased risk of major bleeding [aHR, 0.64 (95% CI: 0.42-0.99)], and a reduction in mortality [aHR, 0.73 (95% CI: 0.54-0.99)]. DOAC users exhibited a significant reduction in major bleeding risk in patients with Child-Pugh class A (aHR, 0.48; 95% CI: 0.33-0.70). DOACs showed potential safety advantages over warfarin for patients with nonvalvular AF and LC, particularly in reducing major bleeding risk in those with Child-Pugh class A.