How many times did the Prophet migrate?
The commandment to Migrate to Madinah came to the Prophet twice; one was the commandment for the sahaba to leave at the heat of persecution. That was in the Zhul Hijjah of the 12th year of Prophethood. The other however came in the Safar of the following year which was the 13th year of Prophethood.