After accounting for other factors such as age, sex, smoking, body mass index and sun exposure, the Swedish study found that "compared to people who drank at least six cups of coffee per day during the year before symptoms appeared, those who did not drink coffee had about a one and a half times increased risk of developing MS."
Similar protective effects were seen among those who drank lots of coffee five to 10 years before symptoms appeared.
Multiple sclerosis is an unpredictable, often disabling disease of the central nervous system that disrupts the flow of information within the brain, and between the brain and body. It affects 2.3 million people worldwide.
In 2012, the average Swede consumed 7.32 kilos of coffee, much higher than the EU average was 4.83 kilos per person, according to statistics by the International Coffee Organization.
The Swedish research into MS was carried out alongside a comparable study in the US.
"Caffeine intake has been associated with a reduced risk of Parkinson's and Alzheimer's diseases," said lead author Ellen Mowry of the Johns Hopkins University School of Medicine in Baltimore, Maryland.
"Our study shows that coffee intake may also protect against MS, supporting the idea that the drug may have protective effects for the brain," she added.
The findings of the US and Swedish studies – released ahead of the American Academy of Neurology annual meeting in Washington – each compared more than 1,000 MS patients to a similar number of healthy people.
Researchers tracked how much coffee the subjects drank in the one, five and 10 years before symptoms began for those afflicted with MS.
The US study found that "people who didn't drink coffee were also about one and a half times more likely to develop the disease
More research is needed to determine if caffeine in coffee has any impact on relapse or long-term disability due to MS.
As well as being funded by the Swedish Medical Research Council, the joint study also recieved money from the US National Institute of Neurological Disorders and Stroke, the National Institute of Environmental Health Sciences and the National Institute on Aging.