Background: Anti-CD20 antibody therapy may be associated with an increased risk of infections. We therefore investigated risk factors for infection in patients with demyelinating diseases treated with anti-CD20 antibody therapy. Methods: In this retrospective uncontrolled study, patients ever treated with anti-CD20 antibodies at an academic clinic were identified through the Danish Multiple Sclerosis Registry (DMSR). Data were collected from medical charts and the DMSR. We assessed occurrence of severe infections (requiring hospitalization), varicella zoster virus (VZV), major comorbidities and routine laboratory values for lymphocytes, IgG and IgM. Results: A total of 447 patients ever treated with anti-CD20 antibody therapy were identified; of these 416 with 649 patient years of follow-up were still under therapy. In this group, seven patients had VZV infections, and 16 patients had been hospitalized with infections during up to three years of follow-up on anti-CD20 therapy. Comorbidity was recorded in 80 patients. The risk of severe infection was associated with comorbidities, higher age, longer duration of treatment, and higher Expanded Disability Status Scale (EDSS) scores. In multivariable analyses treatment duration, EDSS scores and presence of comorbidity were independently associated with risk of severe infections. Serum concentrations of IgG and IgM decreased with increasing duration of therapy but were not associated with risk of severe infections. Patients with VZV infection had lower lymphocyte counts and lower serum concentrations of IgM. In multivariable analyses only lymphocyte counts were independently associated with risk of VZV infection. Conclusions: In this retrospective study of patients treated with anti-CD20 antibodies, the risk of infections requiring hospitalization was independently associated with comorbidities, duration of treatment, and higher EDSS scores. Risk of VZV infection was independently associated with lymphopenia. Future studies investigating strategies for mitigating risk of infection in patients treated with anti-CD20 antibodies are warranted, especially for older patients, patients with higher levels of disability and for patients with a longer duration of treatment.