Background To compare intravitreal aflibercept injection with intravitreal ranibizumab injection for the risk of major arterial thromboembolic events (ATEs) and glaucoma. Methods This retrospective, nationwide cohort study investigated 15 611 and 3867 patients aged >50 years with at least one pharmacy claim for intravitreal ranibizumab injection and aflibercept injection between 2011 and 2016, respectively. The inverse probability of treatment weighting method was performed to adjust the baseline difference between the two groups and the hazard risk of adverse events was estimated using the Cox proportional regression model. Results No significant difference was noted between intravitreal ranibizumab and aflibercept injection for arterial thromboembolic risk, including ischemic stroke and acute myocardial infarction, during a 2-year follow-up (adjusted hazard ratio (HR): 0.87, 95% confidence interval (CI): 0.53-1.42; P = .583). Subgroup analyses revealed that patients age >65 years (adjusted HR: 0.64, 95% CI: 0.45-0.92) and those without coronary artery disease (adjusted HR: 0.59, 95% CI: 0.37-0.95) had significantly lower arterial thromboembolic risk in the aflibercept group than in the ranibizumab group. Additionally, the risk of glaucoma development after intravitreal injection did not significantly differ between the two groups (adjusted HR: 0.63, 95% CI: 0.37-1.06; P = .084). Conclusions No significant differences in the risk of major ATEs and glaucoma were found between ranibizumab and aflibercept, and aflibercept might be safe for use in elderly patients.