Praise be to Allah.
Hijrah (emigration) for the sake of Allah means moving from the land of shirk to the land of Islam, as the Muslims moved from Makkah – before its people became Muslim – to Madinah, because it had become the city of Islam after its people had pledged their allegiance (bay’ah) to the Prophet (peace and blessings of Allah be upon him) and asked him to make hijrah to them.
So Hijrah means migrating emigrating) to join other Muslims. Hijrah may also take the form of moving from one land of shirk to another land of shirk where evil is less prevalent and there is less danger to the Muslims, as when some of the Muslims migrated from Makkah, at the command of the Prophet (peace and blessings of Allah be upon him), to Abyssinia (Ethiopia).
And Allah is the Source of Strength. May Allah bless our Prophet Muhammad and his family and Companions, and grant them peace.
And Allah knows best.