Sometimes a character can go into 'panic' mode if they're low on health.
This leads to them being uncontrollable and running away (sometimes, annoyingly, triggering another battle elsewhere on the map).
They will eventually calm down and come under control again.
How long did you leave it before deciding they won't stop?
Might of been a bug but I waited 5 minutes before I gave up and loaded an older save.