Atrial fibrillation (AF) is a well-known risk factor for stroke. Predicting the risk is important to prevent the first attack and re-attack of cerebrovascular diseases by determining the medication. Although several statistical methods have been developed to assess the stroke risk in AF patients, considerable improvement is needed in predictive performance. We propose a machine learning-based approach based on the massive and complex Korean National Health Insurance (KNHIS) data. We extracted 72-dimensional features, including demographics, health examination, and medical history information, of 754,949 patients with AF from KNHIS. Logistic regression was used to determine whether the extracted features had a statistically significant association with stroke occurrence. Then, we constructed the stroke risk prediction model based on a deep neural network. The extracted features were used as input, and the occurrence of stroke after the diagnosis of AF was the output used to train the model. When the proposed deep learning model was applied to 150,989 AF patients, it was confirmed that stroke risk was predicted with high accuracy, sensitivity, and specificity. As part of preventive medicine, this study could help AF patients prepare for stroke prevention based on predicted stoke associated feature and risk scores.