IMPORTANCE Although highly effective disease-modifying therapies for multiple sclerosis (MS) have been associated with an increased risk of infections vs injectable therapies interferon beta and glatiramer acetate (GA), the magnitude of potential risk increase is not well established in real-world populations. Even less is known about infection risk associated with rituximab, which is extensively used off-label to treat MS in Sweden. OBJECTIVE To examine the risk of serious infections associated with disease-modifying treatments for MS. DESIGN, SETTING, AND PARTICIPANTS This nationwide register-based cohort study was conducted in Sweden from January 1, 2011, to December 31, 2017. National registers with prospective data collection from the public health care system were used. All Swedish patients with relapsing-remitting MS whose data were recorded in the Swedish MS register as initiating treatment with rituximab, natalizumab, fingolimod, or interferon beta and GA and an age-matched and sex-matched general population comparator cohort were included. EXPOSURES Treatment with rituximab, natalizumab, fingolimod, and interferon beta and GA. MAIN OUTCOMES AND MEASURES Serious infections were defined as all infections resulting in hospitalization. Additional outcomes included outpatient treatment with antibiotic or herpes antiviral medications. Adjusted hazard ratios (HRs) were estimated in Cox regressions. RESULTS A total of 6421 patients (3260 taking rituximab, 1588 taking natalizumab, 1535 taking fingolimod, and 2217 taking interferon beta/GA) were included, plus a comparator cohort of 42 645 individuals. Among 6421 patients with 8600 treatment episodes, the mean (SD) age at treatment start ranged from 35.0 (10.1) years to 40.4 (10.6) years; 6186 patients were female. The crude rate of infections was higher in patients with MS taking interferon beta and GA than the general population (incidence rate, 8.9 [95% CI, 6.4-12.1] vs 5.2 [95% CI, 4.8-5.5] per 1000 person-years), and higher still in patients taking fingolimod (incidence rate, 14.3 [95% CI, 10.8-18.5] per 1000 person-years), natalizumab (incidence rate, 11.4 [95% CI, 8.3-15.3] per 1000 person-years), and rituximab (incidence rate, 19.7 [95% CI, 16.4-23.5] per 1000 person-years). After confounder adjustment, the rate remained significantly higher for rituximab (HR, 1.70 [95% CI, 1.11-2.61]) but not fingolimod (HR, 1.30 [95% CI, 0.84-2.03]) or natalizumab (HR, 1.12 [95% CI, 0.71-1.77]) compared with interferon beta and GA. In contrast, use of herpes antiviral drugs during rituximab treatment was similar to that of interferon beta and GA and lower than that of natalizumab (HR, 1.82 [1.34-2.46]) and fingolimod (HR, 1.71 [95% CI, 1.27-2.32]). CONCLUSIONS AND RELEVANCE Patients with MS are at a generally increased risk of infections, and this differs by treatment. The rate of infections was lowest with interferon beta and GA; among newer treatments, off-label use of rituximab was associated with the highest rate of serious infections. The different risk profiles sh...