Recent evidence has shown the existence of a CNS 'waste clearance' system, defined as the glymphatic system. Glymphatic abnormalities have been described in several neurodegenerative conditions, including Alzheimer's and Parkinson's disease. Glymphatic function has not been thoroughly explored in multiple sclerosis, where neurodegenerative processes are intermingled with inflammatory processes. We aimed to investigate glymphatic system function in multiple sclerosis and to evaluate its association with clinical disability, disease course, demyelination and neurodegeneration, quantified using different MRI techniques. In this retrospective study, we enrolled 71 multiple sclerosis patients (49 relapsing-remitting and 22 progressive multiple sclerosis) and 32 age- and sex-matched healthy control subjects. All subjects underwent neurological and MRI assessment including high-resolution T1, T2 and double inversion recovery sequences, diffusion and susceptibility weighted imaging. We calculated the diffusion along perivascular space index, a proxy for glymphatic function, cortical and deep grey matter volume, white and cortical grey matter lesion volume and normal-appearing white matter microstructural damage. Multiple sclerosis patients showed an overall lower diffusion along perivascular space index versus healthy controls (estimated mean difference: -0.09, P = 0.01). Both relapsing-remitting and progressive multiple sclerosis patients had lower diffusion along perivascular space index versus healthy controls (estimated mean difference: -0.06, P = 0.04 for relapsing-remitting and -0.19, P = 0.001 for progressive multiple sclerosis patients). Progressive multiple sclerosis patients showed lower diffusion along perivascular space index versus relapsing-remitting multiple sclerosis patients (estimated mean difference: -0.09, P = 0.03). In multiple sclerosis patients, lower diffusion along perivascular space index was associated with more severe clinical disability (r = -0.45, P = 0.001) and longer disease duration (r = -0.37, P = 0.002). Interestingly, we detected a negative association between diffusion along perivascular space index and disease duration in the first 4.13 years of the disease course (r = -0.38, P = 0.04) without any association thereafter (up to 34 years of disease duration). Lower diffusion along perivascular space index was associated with higher white (r = -0.36, P = 0.003) and cortical (r = -0.41, P = 0.001) lesion volume, more severe cortical (r = 0.30, P = 0.007) and deep (r = 0.42, P = 0.001) grey matter atrophy, reduced fractional anisotropy (r = 0.42, P = 0.001) and increased mean diffusivity (r = -0.45, P = 0.001) in the normal-appearing white matter. Our results suggest that the glymphatic system is impaired in multiple sclerosis, especially in progressive stages. Impaired glymphatic function was associated with measures of both demyelination and neurodegeneration and reflects a more severe clinical disability. These findings suggest that glymphatic impairment may be a pathological mechanism underpinning multiple sclerosis. The dynamic interplay with other pathological substrates of the disease deserves further investigation.