Atrial fibrillation is a predictor of poor prognosis after stroke. To evaluate atrial fibrillation and all-cause and cardiovascular mortality in a stroke cohort with low socioeconomic status, taking into consideration oral anticoagulant use during 12-year follow-up. All-cause mortality was analyzed by Kaplan-Meier survival curve and Cox regression models to estimate hazard ratios and 95% confidence intervals (95% CI). For specific mortality causes, cumulative incidence functions were computed. A logit link function was used to calculate odds ratios (OR) with 95% CIs. Full models were adjusted by age, sex, oral anticoagulant use (as a time-dependent variable) and cardiovascular risk factors. Of 1121 ischemic stroke participants, 17.8% had atrial fibrillation. Overall, 654 deaths (58.3%) were observed. Survival rate was lower (median days, interquartile range-IQR) among those with atrial fibrillation (531, IQR: 46-2039) vs. non-atrial fibrillation (1808, IQR: 334-3301), p-log rank < 0.0001). Over 12-year follow-up, previous atrial fibrillation was associated with increased mortality: all-cause (multivariable hazard ratios, 1.82; 95% CI: 1.43-2.31) and cardiovascular mortality (multivariable OR, 2.07; 95% CI: 1.36-3.14), but not stroke mortality. In the same multivariable models, oral anticoagulant use was inversely associated with all-cause mortality (oral anticoagulant time-dependent effect: multivariable hazard ratios, 0.47; 95% CI: 0.30-0.50, p = 0.002) and stroke mortality (oral anticoagulant time-dependent effect ≥ 6 months: multivariable OR, 0.09; 95% CI: 0.01-0.65, p-value = 0.02), but not cardiovascular mortality. Among individuals with low socioeconomic status, atrial fibrillation was an independent predictor of poor survival, increasing all-cause and cardiovascular mortality risk. Long-term oral anticoagulant use was associated with a markedly reduced risk of all-cause and stroke mortality.