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

Your immune system normally protects you by fighting off viruses, bacteria, and other invaders. In multiple sclerosis (MS), something goes wrong with this system. Instead of attacking only harmful invaders, your immune cells attack myelin—the fatty layer that insulates nerve fibers, similar to the plastic coating on an electrical wire. When myelin gets damaged, nerve signals slow down or stop altogether, causing the symptoms of MS.

Doctors do not yet know exactly why this happens in some people and not others. MS is not contagious and you cannot catch it from someone else. Research shows that MS develops when a combination of factors come together—some you inherit from your parents, some related to where you live, and some tied to infections or other events in your life.

Key Takeaways

  • MS occurs when your immune system damages myelin, the protective coating around nerve fibers in your brain and spinal cord.
  • The condition involves both genetic factors you inherit and environmental triggers that are not yet fully understood.
  • Certain infections, vitamin D levels, and smoking have been linked to MS risk, though having these factors does not mean you will develop the disease.
  • MS is not caused by anything you did or did not do, and it is not contagious.
  • Researchers continue to study why the immune system attacks myelin in some people, which may lead to new ways to prevent or treat MS.

Genes you inherit make MS more likely, but do not may provide you will develop it

If your parent, sibling, or child has MS, your risk of developing it is higher than someone with no family history. Studies of identical twins show that if one twin has MS, the other has about a 30 percent chance of developing it too—meaning genetics plays a role, but is not the whole story.

Scientists have identified more than 200 genetic variations linked to MS risk. Most of these variations affect how your immune system works. Having one or more of these genetic markers does not mean you will get MS; many people with these genes never develop the disease. This is why doctors say MS is genetic but not hereditary—the genes increase risk, but something else has to happen to trigger the disease.

Infections may trigger MS in people who are genetically vulnerable

Several infections have been studied as possible MS triggers. The strongest evidence involves the Epstein-Barr virus (EBV), which causes mononucleosis. Nearly all people infected with EBV recover without problems, but research suggests that in people with certain genes, EBV infection might set off the immune system in a way that leads to MS years later.

Other infections under study include measles, herpes simplex virus, and human herpesvirus 6. The theory is not that these viruses directly cause MS, but that they may activate immune cells in a way that causes the body to start attacking myelin. This would explain why MS often develops months or years after an infection, and why most people who have these infections never develop MS.

Where you live and sun exposure affect your MS risk

MS is more common in countries farther from the equator, particularly in northern Europe, North America, and Australia. Researchers believe this is connected to vitamin D, which your skin produces when exposed to sunlight. People living in northern climates get less sun exposure and often have lower vitamin D levels.

Studies show that people with low vitamin D levels have a higher risk of MS. Vitamin D helps regulate your immune system, and low levels may make it more likely that your immune cells will attack myelin. This does not mean that taking vitamin D supplements will prevent MS, but it suggests that sun exposure and vitamin D are part of the picture of how MS develops.

Smoking and other lifestyle factors may increase MS risk

People who smoke have roughly twice the risk of developing MS compared to people who have never smoked. Smoking may damage the protective barriers in your body that normally keep immune cells from attacking your own tissues. Quitting smoking reduces this risk over time.

Obesity in childhood and adolescence has also been linked to higher MS risk in some studies. Researchers are still working to understand whether obesity itself increases risk, or whether it is connected to other factors like vitamin D levels or inflammation in the body. Stress, diet, and other lifestyle factors are being studied, but the evidence is not yet clear enough to say they directly cause MS.

Your immune system may mistake myelin for an invader

One theory about why MS develops is called molecular mimicry. This idea suggests that a virus or bacteria may have a protein that looks similar to myelin. When your immune system fights off that infection, it learns to recognize and attack that protein. Later, your immune system might mistakenly attack myelin because it looks like the invader you fought before.

Another theory focuses on a breakdown in immune tolerance—the system that normally prevents your immune cells from attacking your own body. In MS, this system may fail, allowing immune cells to slip past the barriers that protect your brain and spinal cord and begin attacking myelin. Researchers are working to understand which of these mechanisms, or combination of them, actually causes MS to develop.

The role of sex hormones in MS risk

MS is diagnosed in women about two to three times more often than in men. Researchers believe this difference is related to sex hormones, particularly estrogen. Pregnancy appears to reduce MS activity in many women, especially during the third trimester when estrogen levels are highest. After delivery, disease activity often increases again.

Hormonal changes during puberty, menstruation, and menopause may also affect MS risk and symptoms. This does not mean that hormones cause MS, but rather that they influence how the immune system behaves in people who are already genetically vulnerable. This is an active area of research that may eventually lead to new treatment approaches.

Frequently Asked Questions

Can you get MS from someone else?

No. MS is not contagious. You cannot catch it from a family member, friend, or coworker who has the disease. MS develops from a combination of genes you inherit and environmental factors, not from exposure to another person.

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. Even identical twins, who share all their genes, have only about a 30 percent chance of both having MS. This shows that genes alone do not determine whether you will develop MS.

Does stress cause MS?

Stress does not cause MS, but some research suggests that high stress may trigger relapses in people who already have the disease. MS develops from genetic and environmental factors that come together over time, not from stress alone.

Can I prevent MS if it runs in my family?

There is no proven way to prevent MS. If MS runs in your family, maintaining good overall health—including adequate sun exposure or vitamin D levels, not smoking, and managing stress—may be helpful, but these steps do not may provide prevention. Talk with your doctor about what you can do based on your individual situation.

Why do more women get MS than men?

Researchers believe sex hormones, particularly estrogen, play a role in this difference. MS is diagnosed in women about two to three times more often than in men. Pregnancy can reduce MS activity, suggesting that hormone levels influence how the immune system behaves in people genetically vulnerable to MS.