The findings may help explain anecdotal reports of the "sunshine vitamin" preventing or easing symptoms, say scientists.
MS is known to be more prevalent in parts of the world furthest from the equator, where there is less sunshine to trigger production of vitamin D in the skin.
Scotland has the highest prevalence of MS in the world, with around 10,500 people affected.
The disease is caused by the body's own immune defences damaging myelin, a fatty insulating sheath that surrounds nerve fibres and is vital to the proper transmission of nerve signals.
Destruction of myelin leads to symptoms ranging from numbness to blurred vision and paralysis.
"With this research, we learned vitamin D might be working not by altering the function of damaging immune cells but by preventing their journey into the brain," said lead scientist Dr Anne Gocke, from Johns Hopkins University School of Medicine in the US. "If we are right, and we can exploit Mother Nature's natural protective mechanism, an approach like this could be as effective as and safer than existing drugs that treat MS."
In a person with MS, immune system cells called T-cells are primed to travel out from the lymph nodes and seek and destroy myelin in the central nervous system.
Dr Gocke's team of researchers simultaneously gave mice the rodent form of MS and a high dose of vitamin D.
They found that disease symptoms were suppressed in the animals.