Multiple sclerosis is caused by your immune system mistakenly attacking the brain and nerves. It's not clear why this happens but it may be a combination of genetic and environmental factors.