Hijrah was not something special for Prophet Muhammad (peace and blessings be upon him). Rather, some of Allah’s Prophets emigrated before Prophet Muhammad (peace and blessings be upon him). Yet, the Hijrah of Prophet Muhammad (peace and blessings be upon him) differed from those of other Prophets because it was not intended as a flight from torture but as the beginning of the Islamic State.
Sheikh Yusuf Al-Qaradawi, states the following: Most of Allah’s Messengers, if not all, emigrated. However, their emigrations differed from that of Prophet Muhammad (peace and blessings be upon him). For example, Prophet Ibrahim (peace and blessing be upon him) emigrated, as related in the Qur’an: (And Lot believed him, and said: Lo! I am a fugitive unto my Lord. Lo! He, only He, is the Mighty, the Wise) (Al-`Ankabut 29: 26). In another verse, He Almighty says: (And he said: Lo! I am going unto my Lord Who will guide me) (As-Saffat 37: 99). So, Prophet Ibrahim (peace and blessings be upon him) migrated from place to place till he settled at a town in Palestine, where he was then buried. That town, Al-Khalil Ibrahim, is now named after him.

Prophet Musa (peace and blessings be upon him) also emigrated before he was assigned with the divine mission. He fled from Egypt after he had mistakenly killed an Egyptian. He sought Allah’s forgiveness for that, and a man advised him to get out of Egypt in order to escape people’s revenge. Allah Almighty says: (And a man came from the uttermost part of the city, running. He said: O Moses! Lo! the chiefs take counsel against thee to slay thee; therefore escape. Lo! I am of those who give thee good advice. So he escaped from thence, fearing, vigilant. He said: My Lord ! Deliver me from the wrongdoing folk) (Al-Qasas 28: 20-21).
then Prophet Musa (peace and blessings be upon him) went to a country called Madyan, where he married the daughter of a righteous old man (Prophet Shu`aib, peace be upon him) and stayed with him for ten years. Throughout that period, Musa had no divine mission. He lived as a righteous man, a good husband, and a generous son-in-law; however, he had no prominent role to perform.
that is to say, Prophet Musa (peace and blessings be upon him) emigrated for fear of revenge. He said, as related in the Qur’an: (Then I fled from you when I feared you, and my Lord vouchsafed me a command and appointed me (of the number) of those sent (by Him)) (Ash-Shu`ara’ 42: 21). On the other hand, the Hijrah of Prophet Muhammad (peace and blessings be upon him) was not only to escape temptation and torture of his people. It was the starting point to establish the Muslim Ummah, a new Muslim community based on Islam, the universal divine message that calls for morality and human rights. That was the very purpose of Prophet Muhammad’s Hijrah to Madinah, and he (peace and blessings be upon him) performed his role as best as possible. He put the foundation of a sound Muslim community and established the best Ummah ever created.