While a pinched nerve and MS can both cause muscle and nerve pain, they have different causes that doctors can test for. A pinched nerve occurs due to compression of a nerve, while MS occurs due to damage to the pathways that regulate your bodily sensations.