Objective: Anticoagulation therapy is commonly interrupted in patients with atrial fibrillation (AF) for elective procedures. However, the risk factors of acute ischemic stroke (AIS) during the periprocedural period remain uncertain. We performed a nationwide analysis to evaluate AIS risk factors in patients with AF undergoing elective surgical procedures. Methods: Using the Nationwide Readmission Database, we included electively admitted adult patients with AF and procedural Diagnosis-Related Group codes from 2016 to 2019. Diagnoses were identified based on International Classification of Disease, 9th revision-Clinical Modification (ICD-10 CM) codes. We constructed a logistic regression model to identify risk factors and developed a new scoring system incorporating CHA 2 DS 2 VASc to estimate periprocedural AIS risk. Results: Of the 1,045,293 patients with AF admitted for an elective procedure, the mean age was 71.5 years, 39.2% were women, and 0.70% had a perioperative AIS during the index admission or within 30 days of discharge. Active cancer (adjusted OR [aOR] = 1.58, 95% confidence interval [CI] = 1.42-1.76), renal failure (aOR = 1.14, 95% CI = 1.04-1.24), neurological surgery (aOR = 4.51, 95% CI = 3.84-5.30), cardiovascular surgery (aOR = 2.74, 95% CI = 2.52-2.97), and higher CHA 2 DS 2 VASc scores (aOR 1.25 per point, 95% CI 1.22-1.29) were significant risk factors for periprocedural AIS. The new scoring system (area under the receiver operating characteristic curve [AUC] = 0.68, 95% CI = 0.67 to 0.79) incorporating surgical type and cancer outperformed CHA 2 DS 2 VASc (AUC = 0.60, 95% CI = 0.60 to 0.61). Interpretation: In patients with AF, periprocedural AIS risk increases with the CHA 2 DS 2 VASc score, active cancer, and cardiovascular or neurological surgeries. Studies are needed to devise better strategies to mitigate perioperative AIS risk in these patients.