When you twist or sprain your ankle, you can injure the nerves around the ankle joint. The nerves can be stretched following the injury which can lead to nerve conduction problems and resultant continued pain. The tissues around the sprained ankle can also become damaged and can then put pressure on nerves by compressing the nerves. This is another reason you may have continued pain.
( from Netter Atlas of Human Anatomy)
If you are still having persistent pain after an ankle injury, come see Palm Desert Foot and Ankle Doctor Harvey Danciger. He can evaluate if there is a nerve problem and let you know what can be done.