© 2015 The Authors. Background The prevalence of both atrial fibrillation (AF) and diabetes mellitus (DM) are rising, and these conditions often occur together. Also, DM is an independent risk factor for stroke in patients with AF. We aimed to examine the safety and efficacy of rivaroxaban vs warfarin in patients with nonvalvular AF and DM in a prespecified secondary analysis of the ROCKET AF trial. Methods We stratified the ROCKET AF population by DM status, assessed associations with risk of outcomes by DM status and randomized treatment using Cox proportional hazards models, and tested for interactions between randomized treatments. For efficacy, primary outcomes were stroke (ischemic or hemorrhagic) or non-central nervous system embolism. For safety, the primary outcome was major or nonmajor clinically relevant bleeding. Results The 5,695 patients with DM (40%) in ROCKET AF were younger, were more obese, and had more persistent AF, but fewer had previous stroke (the CHADS2 score includes DM and stroke). The relative efficacy of rivaroxaban and warfarin for prevention of stroke and systemic embolism was similar in patients with (1.74 vs 2.14/100 patient-years, hazard ratio [HR] 0.82) and without (2.12 vs 2.32/100 patient-years, HR 0.92) DM (interaction P =.53). The safety of rivaroxaban vs warfarin regarding major bleeding (HRs 1.00 and 1.12 for patients with and without DM, respectively; interaction P =.43), major or nonmajor clinically relevant bleeding (HRs 0.98 and 1.09; interaction P =.17), and intracerebral hemorrhage (HRs 0.62 and 0.72; interaction P =.67) was independent of DM status. Adjusted exploratory analyses suggested 1.3-, 1.5-, and 1.9-fold higher 2-year rates of stroke, vascular mortality, and myocardial infarction in DM patients. Conclusions and Relevance The relative efficacy and safety of rivaroxaban vs warfarin was similar in patients with and without DM, supporting use of rivaroxaban as an alternative to warfarin in diabetic patients with AF.