Multiple sclerosis develops when your immune system attacks the protective coating around nerve fibers in your brain and spinal cord

Multiple sclerosis (MS) is not something you catch from another person or inherit in a straightforward way. Instead, it results from a combination of factors that cause your body's immune system to mistakenly damage myelin—the fatty sheath that insulates nerve fibers. When myelin is damaged, nerve signals slow down or stop entirely, which produces the symptoms of MS. Why this happens in some people and not others remains incompletely understood, but research has identified several conditions that must align for MS to develop.

The damage does not happen all at once. MS typically involves repeated episodes of inflammation in different parts of the nervous system over months or years. Each episode can create new areas of scarring (called lesions or plaques), which is why the disease is called "multiple" sclerosis. The pattern and location of these lesions determine which symptoms a person experiences.

Key Takeaways

  • MS occurs when your immune system attacks myelin, the insulation around nerve fibers, but the exact trigger remains unknown.
  • Genetics play a role—MS runs in families and is more common in people of Northern European ancestry—but having the genes does not may provide you will develop the disease.
  • Environmental factors such as vitamin D deficiency, certain viral infections (particularly Epstein-Barr virus), and smoking increase the risk of MS in people who are genetically susceptible.
  • MS is not contagious and cannot be passed from parent to child through genes alone; both genetic and environmental conditions must be present.
  • Most people develop MS between ages 20 and 40, though it can appear at any age.

The genetic component: why MS runs in families but is not purely inherited

If a parent, sibling, or child has MS, your risk of developing it is higher than the general population. However, the risk is still relatively low—roughly 2 to 3 percent for a first-degree relative, compared to about 0.1 percent in the general population. This means that having a family member with MS does not make MS inevitable.

Scientists have identified over 200 genetic variations associated with MS risk, but no single "MS gene" exists. Instead, multiple genes work together, each contributing a small amount to overall susceptibility. The most significant genetic factor involves the HLA (human leukocyte antigen) system, which helps your immune system recognize foreign substances. Certain HLA variants are more common in people with MS, particularly HLA-DRB1 and HLA-DQA1.

MS is also more common in people of Northern European ancestry and less common in people of African, Asian, and Hispanic descent, though the reasons for these differences are not fully clear. Geographic patterns suggest that both ancestry and environmental exposures in different regions play roles.

Viral infections and the immune system trigger

Researchers have long suspected that a viral infection acts as a trigger for MS in genetically susceptible people. The strongest evidence points to Epstein-Barr virus (EBV), which causes infectious mononucleosis. Nearly all people with MS have been infected with EBV at some point, whereas only about 90 percent of the general population has. More importantly, people who develop MS typically had EBV infection before their MS symptoms appeared, suggesting the virus may initiate the immune response that leads to MS.

The mechanism is not yet fully understood, but one theory suggests that EBV-infected cells resemble myelin proteins closely enough that the immune system, once activated against EBV, continues attacking myelin by mistake. Other viruses have been studied as potential triggers, including human herpesvirus 6 and cytomegalovirus, but the evidence is less consistent.

Importantly, most people infected with EBV never develop MS. This reinforces that viral infection alone is not sufficient—genetic predisposition must also be present.

Vitamin D deficiency and sun exposure

Low vitamin D levels are associated with increased MS risk, and this association may explain why MS is more common in regions farther from the equator, where sunlight is less intense. Your skin produces vitamin D when exposed to ultraviolet B (UVB) radiation from the sun, and vitamin D plays a role in regulating immune function.

Studies show that people with MS tend to have lower vitamin D levels than people without MS, and some research suggests that vitamin D deficiency during childhood or adolescence may increase risk. However, it remains unclear whether low vitamin D causes MS or whether people destined to develop MS happen to have lower vitamin D for other reasons. Vitamin D supplementation has not been shown to prevent MS in people at risk, though some research is ongoing.

The relationship between sun exposure and MS risk is complex. While vitamin D deficiency is one proposed mechanism, other factors related to latitude—such as different viral exposures or genetic ancestry patterns in different regions—may also contribute.

Smoking and other environmental factors

Smoking significantly increases the risk of developing MS in people who are genetically susceptible. The risk appears to be dose-dependent, meaning heavier smokers face higher risk than light smokers. People who quit smoking may see their risk decrease over time, though it does not return to the level of people who never smoked.

Other environmental exposures under investigation include air pollution, certain occupational exposures, and diet, though the evidence is less established than it is for smoking, vitamin D, and viral infection. Obesity in childhood and adolescence has also been associated with increased MS risk in some studies.

Stress has been proposed as a trigger, and some people report that their MS symptoms worsened after stressful events, but whether stress actually causes MS to develop in the first place remains unclear.

Why women develop MS more often than men

MS is diagnosed roughly two to three times more often in women than in men, and this gap has been widening over recent decades. The reasons are not fully understood, but several factors likely contribute.

Hormonal differences may play a role. Pregnancy appears to reduce MS disease activity, particularly in the third trimester, and some women experience a relapse in the months after giving birth. Estrogen levels fluctuate throughout the menstrual cycle and change with hormonal contraceptives and hormone therapy, all of which could theoretically influence immune function. However, the relationship between hormones and MS risk is complex and not yet fully mapped.

Sex differences in immune response may also matter. Women's immune systems tend to mount stronger antibody responses to infections than men's do, which could increase the risk of autoimmune disease. Additionally, women may be more likely to seek medical care and receive a diagnosis, which could partly explain the higher reported rates.

Age of onset and why MS typically appears in young adulthood

Most people receive an MS diagnosis between ages 20 and 40, though MS can develop at any age. Childhood MS and MS diagnosed after age 50 both occur but are less common. The reason MS typically emerges in young adulthood is not known with certainty.

One possibility is that the immune system undergoes changes during adolescence and early adulthood that increase vulnerability. Another is that a triggering event—such as EBV infection or another environmental exposure—must occur after genetic susceptibility is established, and the timing of these events varies. It is also possible that MS develops silently in the nervous system for years before symptoms appear, making the actual age of onset earlier than the age of diagnosis.

Frequently Asked Questions

Can you inherit MS directly from a parent?

MS does not follow a simple inheritance pattern. If a parent has MS, your risk is higher than average, but most children of people with MS do not develop the disease. You inherit genes that increase susceptibility, but genes alone do not cause MS—environmental factors must also be present.

If I have the genes for MS, will I definitely develop it?

No. Many people carry genetic variations associated with MS risk but never develop the disease. This is why researchers believe that both genetic predisposition and environmental triggers are necessary. Having the genes is a necessary but not sufficient condition.

Is MS contagious?

MS is not contagious. You cannot catch it from another person. While viral infections like EBV may play a role in triggering MS in susceptible people, the virus itself does not cause MS, and most people infected with EBV never develop MS.

Can I prevent MS if I am at high risk?

There is no proven way to prevent MS. If you have a family history of MS, maintaining adequate vitamin D levels, avoiding smoking, and managing stress may reduce risk, but these steps do not may provide prevention. Speak with your doctor about what steps make sense for your situation.

Why did I develop MS if no one in my family has it?

Most people diagnosed with MS do not have a known family history. MS can develop in people with no family connection to the disease, suggesting that genetic risk factors are widespread in the population and that environmental triggers play a significant role in determining who develops MS.