Multiple sclerosis (MS) is an autoimmune demyelinating disease of the central nervous system (CNS). Anxiety and depression are the most common psychiatric comorbidities of MS, which seriously affect patients’ quality of life, treatment compliance, and prognosis. However, current treatments for anxiety and depression in MS show low therapeutic efficacy and significant side effects. In the present study, we explored the therapeutic effects of a novel low-toxic anti-inflammatory drug, nanoparticulate magnesium hydride (MgH), on mood disorders of MS. We observed that anxiety/depression-like behaviors in experimental autoimmune encephalomyelitis (EAE) mice were alleviated by MgH treatment. In addition, disease severity and inflammatory demyelination were also diminished. Furthermore, we confirmed the suppressive effect of MgH on depression in the acute restraint stress model. Mechanistically, MgH may play a therapeutic role by promoting microglial M2 polarization, inhibiting microglial M1 polarization, and reducing oxidative stress and mitochondrial damage. Therefore, nanoparticulate MgH may be a promising therapeutic drug for psychiatric comorbidities of MS.© 2023. The Author(s).