Abstract Funding Acknowledgements Type of funding sources: None. Background Atrial fibrillation (AF) is associated with important mortality. Dedicated clinical scores to predict mortality have been developed but perform modestly and are not specific for this population. Machine learning models are developing in the field of AF and may be able to outperform existing tools for the prediction of mortality. Purpose This study aimed to train and evaluate machine learning models for the prediction death occurrence within this critical period of the year following atrial fibrillation diagnosis and to compare predictive ability to usual clinical scores. Methods We used for this purpose a nationwide cohort of 2,435,541 newly diagnosed atrial fibrillation patients seen in all the French hospitals from 2011 to 2019. Three ML models (logistic regression, random forests, deep neural networks) were trained to predict mortality within the first year on a train set (70% of the cohort). The best model was selected to be evaluate on the test set (30% of the cohort). Discrimination of the best model was evaluated using the C index. We finally compared our best model with previously published scores. Results Within the first year following AF diagnosis, 342,005 patients (14.4%) died after a mean time of 83 (SD 98) days in whom 107,715 were from cardiovascular deaths (31.5%). Among 110 variables, the 18 most predictive variables were identified and selected using a Random Forest algorithm: age, metastasis, resuscitated cardiac arrest, cancer, congestive heart failure, decubitus ulcers, renal failure, pneumonia, lung disease, difficulty in walking, malnutrition, anemia, impaired mobility, liver disease, renal disease, blood transfusion and urinary tract infection. After training 3 ML algorithms, the best ML model selected was a deep neural network with a C index of 0.785 (95% CI, 0.781-0.789) on the test set. The incidence of all cause death at one year rises in a stepwise fashion from 13.8 per 1000 patients for the first quintile to 352.4 per 1000 for the fifth quintile. Compared to traditional clinical risk scores, the selected model was significantly superior to the CHA2DS2-VASc and HAS-BLED scores, and dedicated scores such as Charlson Comorbidity Index and Hospital Frailty Risk Score to predict death within the year following AF diagnosis (C indexes: 0.597; 0.562; 0.643; 0.626 respectively. P<0.0001) (Figure 1). The ability to predict AF was improved as shown by the net reclassification index and integrated discriminatory improvement increase (P<0.0001, respectively) and decision curve analysis (Figure 2). Conclusion Machine learning algorithms predict early death after AF diagnosis with a better ability than previously developed traditional clinical risk scores. A ML approach may help clinicians to better risk stratify AF patients at high risk of mortality.