The Hijra of the Prophet Muhammad (Peace be upon him) and his companions was a watershed event in the history of human enlightenment. It was a move from a closed-minded society to an open-minded, from a hostile people to warm-hearted people. This migration is not about escaping from persecution in Makkah. If it were, then the migration would be an end in itself. We will see why this is not the case.
Purpose of Hijra:

The purpose of Hijra in Islam is to find a place where Da’wah and Islamic practices can be done peacefully. In fact, Muslims shouldn’t live in places where they could not practice essential Islamic practices. Allah says in the Qur’an [Sura Nisaa]:
as for those whom the angels take while they are doing wrongs (as they stayed among the disbelievers even though emigration was obligatory for them), they (angels) Say (to them): “In what (condition) were you?” they reply: We were weak and suppressed on earth. angels say: “Was not the earth of Allah spacious enough for You to emigrate therein?” such men will find their place in Hell – what an evil destination!

  1. except the weaks among the men, women and Children who cannot devise a plan, nor are they Able to set their directions.
    What does Allah say about the Migrants and Helpers?
    In the following verse, Allah mentions some actions of the migrants (Muhajiroon).
    (Sura Al-Anfaal Verse 72)
    Verily, those who believed, and migratedand strugle hard and fought with their property and their lives in the Cause of Allah as well as those who gave (them) asylum and help, – These are allies to each other…
    This verse, which mentions what they did after emigration, is a clear proof that Hijra was not end in itself.
    What happened in Madeena, after the Hijra?
    Here are some events and actions of the Prophet Muhammad (Peace be upon him) and his companions that led to the spread of Islam across the world, the establishment of an Islamic State, and the codification of laws for the society. The spreading of Islam and establishing the Islamic state are the real objectives (the end goals), and Hijra is a means to achieve these goals.
    • The laws on Zakath, Fasting, family, inheritance, trade etc were revealed in Madeena
    • The laws on Jihad as well as our relationship with non-Muslims were revealed here
    • Prophet Muhammad (Peace be upon him) demonstrated the three core things to lay foundation of a society
    o Establishing Masjid
    o Removing tribal & racial affiliations of Muslims and establishing brotherhood between Ansar and Muhajir
    o A covenant/treaty establishing rights and responsibilities of all parties in Madeena
    • Send delegations to other rulers to invite them to Islam
    • Prophet Muhammad (Peace be upon him) and his companions demonstrated their commitment and sacrifices for the sake of Allah by waging many wars that were forced upon them
    It is clear from the events unfolded in Madeena that Hijra was really a means to the end goals of spreading Islam and establishing Allah’s Laws on earth. Hijra is a Sunnah of Allah, and many prophets before Prophet Muhammad (Peace be upon him) have done that. The objective remains the same.