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

MS is not something you catch from another person or inherit in a straightforward way. Instead, it happens when your body's immune system mistakenly treats myelin—the fatty layer that insulates nerve fibers—as a threat and damages it. This damage slows or blocks the electrical signals that travel along your nerves, which is why MS causes symptoms like fatigue, vision problems, numbness, and difficulty walking.

Scientists do not yet know exactly why this immune attack starts in some people and not others. Research points to a combination of factors: your genes, your environment, and possibly infections you have had. No single cause has been found, and having a family member with MS does not mean you will develop it.

Key Takeaways

  • MS occurs when your immune system damages myelin, the protective coating around nerve fibers, but the exact trigger remains unknown.
  • Genetics play a role—having a close relative with MS raises your risk—but inheritance is complex and not may provide.
  • Environmental factors such as where you live, vitamin D levels, and past infections may influence whether MS develops in genetically susceptible people.
  • MS is not contagious and cannot be caught from another person.
  • Most people develop MS between ages 20 and 40, though it can appear at any age.

Genetic factors that increase MS risk

If you have a parent, sibling, or child with MS, your risk of developing it is higher than the general population. However, most people with a family history of MS never develop the disease. Scientists have identified over 200 genetic variations linked to MS risk, but no single gene causes it on its own.

Your genes appear to control how your immune system responds to threats and how well it distinguishes between your own cells and foreign invaders. People of Northern European descent have higher rates of MS than other populations, suggesting that certain genetic backgrounds carry more of these risk variations. If you are concerned about family history, talking with your doctor about your personal risk is more useful than genetic testing, since no test can predict whether you will develop MS.

Environmental triggers and infections

Where you live and what infections you have had may matter. MS is more common in countries farther from the equator, and some research suggests that lower vitamin D exposure—from less sunlight—may play a role. People who move from a low-risk area to a high-risk area before age 15 tend to adopt the risk level of their new location, which points to environmental factors at work.

Certain infections have been studied as possible triggers. The Epstein-Barr virus (EBV), which causes mononucleosis, is present in nearly all people with MS, though most people infected with EBV never develop MS. Other viral infections have been investigated, but no infection has been proven to cause MS directly. Smoking also appears to increase risk, particularly in people who are already genetically susceptible.

Why your immune system attacks myelin

In MS, your immune system produces antibodies and activates T cells that target myelin as if it were a pathogen. Normally, your immune system has checkpoints that prevent it from attacking your own tissues. In MS, these checkpoints fail. Researchers believe this happens because of a combination of genetic vulnerability and environmental exposure—possibly an infection that resembles myelin closely enough to confuse your immune system.

Once the attack begins, inflammation damages myelin and the nerve fibers underneath. Your body tries to repair this damage, but the repair is often incomplete. Over time, repeated attacks lead to scarring (sclerosis) and permanent nerve damage. This is why early treatment, which slows the immune attack, can reduce long-term disability.

Age and sex differences in MS development

MS typically appears between ages 20 and 40, though it can develop at any age. Women are diagnosed with MS about two to three times more often than men. Researchers are still investigating why sex hormones and immune function interact this way, but the difference is consistent across populations.

If you develop MS before age 18, it is called pediatric-onset MS and may progress differently than adult-onset disease. If symptoms first appear after age 50, it is less common but still possible. The age at which MS starts can affect how quickly it progresses and how well certain treatments work, so telling your doctor when you first noticed symptoms matters for your care plan.

What does not cause MS

MS is not contagious. You cannot catch it from someone who has it, and you cannot pass it to others. It is not caused by stress, diet, or lifestyle choices, though managing stress and staying physically active may help with symptom management. Vaccines do not cause MS—large studies have found no link between any vaccine and MS development.

MS is also not a result of something you did or did not do. It is not caused by a single infection, a single gene, or a single environmental exposure. The disease emerges from a complex interaction of factors that scientists are still working to understand fully.

Frequently Asked Questions

If my parent has MS, will I definitely get it?

No. Having a parent with MS increases your risk, but most children of people with MS never develop the disease. Your risk depends on which genes you inherited and your environmental exposures. Genetic testing cannot predict whether you will develop MS.

Can you get MS from someone else?

No, MS is not contagious. You cannot catch it from a person who has MS, and you cannot pass it to others. It is an autoimmune disease, not an infection.

Does vitamin D deficiency cause MS?

Low vitamin D may increase risk in people who are already genetically susceptible, but it does not cause MS on its own. The link between sunlight exposure, vitamin D, and MS risk is still being studied, and taking vitamin D supplements does not prevent MS in people at risk.

Can MS develop suddenly or does it come on gradually?

MS symptoms can appear suddenly—some people wake up with vision loss or numbness—or develop over days or weeks. The underlying immune attack may have been building for longer, but the moment you notice symptoms is often abrupt. If you experience sudden neurological symptoms, contact your doctor promptly.

Is MS hereditary?

MS has a genetic component, but it is not inherited in a simple, predictable way like some genetic diseases. Having a family member with MS raises your risk, but genes alone do not determine whether you develop it. Environment and other factors matter too.