Immune checkpoint inhibitors (ICIs) and Janus kinase inhibitors (JAKis) have raised concerns over serious unexpected cardiovascular adverse events. The widespread pleiotropy in genome-wide association studies offers an opportunity to identify cardiovascular risks from in-development drugs to help inform appropriate trial design and pharmacovigilance strategies. This study uses the Mendelian randomization (MR) approach to study the causal effects of 9 cardiovascular risk factors on ischemic stroke risk both independently and by mediation, followed by an interrogation of the implicated expression quantitative trait loci (eQTLs) to determine if the enriched pathways can explain the adverse stroke events observed with ICI or JAKi treatment. Genetic predisposition to higher systolic blood pressure (SBP), diastolic blood pressure (DBP), body mass index (BMI), waist-to-hip ratio (WHR), low-density lipoprotein cholesterol (LDL), triglycerides (TG), type 2 diabetes (T2DM), and smoking index were associated with higher ischemic stroke risk. The associations of genetically predicted BMI, WHR, and TG on the outcome were attenuated after adjusting for genetically predicted T2DM [BMI: 53.15% mediated, 95% CI 17.21%–89.10%; WHR: 42.92% (4.17%–81.67%); TG: 72.05% (10.63%–133.46%)]. JAKis, programmed cell death protein 1 and programmed death ligand 1 inhibitors were implicated in the pathways enriched by the genes related to the instruments for each of SBP, DBP, WHR, T2DM, and LDL. Overall, MR mediation analyses support the role of T2DM in mediating the effects of BMI, WHR, and TG on ischemic stroke risk and follow-up pathway enrichment analysis highlights the utility of this approach in the early identification of potential harm from drugs.