Women have a higher risk of developing multiple sclerosis (MS), potentially due to hormonal factors. Elevated testosterone levels, common in polycystic ovary syndrome (PCOS), might influence MS risk. To investigate the relationship between PCOS, as a proxy for elevated testosterone levels, and MS risk through phenotypic and genomic analysis. Cox regression models analysed the association between PCOS and MS risk. The genome-wide cross-trait analysis examined the genetic architecture. In a Swedish cohort of 1,374,529 women, 77 (0.3%) with PCOS and 3,654 (0.3%) without PCOS were diagnosed with MS. After adjusting for birth year and obesity, no association was found between PCOS and MS (HR = 0.91, 95% CI = 0.72-1.15), which was confirmed by Mendelian randomization analysis, where genetically predicted PCOS propensity, sex hormone-binding globulin (SHBG), or testosterone levels did not causally affect MS risk (all p-values > 0.05). By exploring horizontal pleiotropy, we identified shared genetic regions and 19 independent pleiotropic SNPs for SHBG with MS and 11 for testosterone with MS. We did not find evidence for a causal role of PCOS, as a proxy of elevated testosterone, in reducing the risk of MS in women. The shared genetic loci between testosterone, SHBG, and MS provide biological insights.