Thanks for writing to us.
Since the movement of toes is causing pain near the ankle, it is likely to be a ligament injury
. But it is best to rule out a bony injury after getting a non weight bearing X- ray of the area done. Till then you can use a crepe bandage for relief.
I hope this information has been both informative and helpful for you.
Dr. Praveen Tayal