He left Mecca to Medina by God's comman to him as God informed him that The Pagans in Mecca are planning to assassinate him. People of Mecca who were the Prophet's kinship , forced him to leave as they did not accept his beliefs and tortured his people. God informed prophet Mohamed that the tribe leaders who, didn't accept Islam, planed to assassinate him. He was commanded by God to immigrate to Medina. After his exile, he left for Medina, and gathered a group of people. Muhammad then returned to Mecca. The journey to Mecca from Medina was called the Hijra. God commanded him to migrate. One of the reasons was because the Muslims were being persecuted and ill treated in Mecca.The first reason was that Muhammad had been warned by God about the plan to assassinate him and further commanded to migrate. As per God's orders did Muhammad choose to migrate. Another critical factor was the ever-growing resistance of the Makkans and all the persecutions that came with it.