In A.D. 622, the Holy Prophet decided that the Muslims should migrate from Mecca to Madina. The Muslims were required to proceed to Madina in batches.
Abu Salmah Abdullah bin Ashhal was the first Muslim to migrate from Mecca to Madina. He was followed by Bilal and Ammar Yasir. Thereafter Umar migrated from Mecca. While most of the other Muslims left Mecca in secret, Umar publicly declared that he was proceeding to Madina. He even challenged the Quraish that if any one of them had the courage to stop him from going to Madina, he was welcome to try his strength with hin. No Quraish of Mecca could have the courage to prevent the migration of Umar, and no one accepted the challenge to measure strength with him.
According to Ibn Asakir, Ali commented on the migration of Umar in the following terms:
I never knew any one migrate unless secretly except Umar, for he, when he resolved on migration, girt on his sword and slung over his bow and grasped in his hand its arrows, and went to the Ka'bah where in its quadrangle were the chiefs of the Quraish, and he went round about it seven times, then prayed two raka'ts at the station of Abraham, and went to each, one by one, in their circle and said, "May the face be foul of such as desire that his mother be bereaved of him and his child be left an orphan and his wife a widow, and if there be such a one, let him meet me behind this valley, but no one followed him.
In Sahih Bukhari it is stated that some twenty Muslims accompanied Umar on the occasion of his migration from Mecca. His companions included Zaid bin Khattab the brother of Umar; Said bin Zaid, the nephew of Umar and Khunais bin Hudhaifah the son-in-law of Umar (the husband of Hafsa). Other persons who accompanied Umar included: Amr b Suraqah; Abdullah b Suraqah; Waqid b Abdullah Tamimi; Khaula b Abi Khaula; Malik b Abi Khallla; Ayas b Bukair; Aqil b Bukair; Amir b Bukair and Khalid b Bukair.
Ayyash b Abu Rabiah al- Makhzumi and Hisham b Al-Aas b Wail al-Sahmi also decided to migrate with Umar. They made an appointment to meet at the thorn tree of Adat of Banu Ghifar about ten miles from Mecca. It was decided that if any one of them failed to turn up at the appointed place by sunrise on the day of departure fixed before hand it would be construed that he was not coming and had been held back by force.
Umar with his companions and Ayyash arrived at the appointed meeting place according to schedule. Hisham did not turn up and was held back by the Quraish.
The party arrived at Quba on the outskirts of Madina and there they stayed with Banu Amr bin Auf.
One day Abu Jahl and al-Harith rode to Quba and contacted Ayyash who was their cousin. They told Ayyash that his mother had vowed that she would not comb her hair, nor take shelter from the sun until she saw Ayyash.
Umar told Ayyash that this was nothing but an attempt to seduce him from his religion. Umar added that if the lice disturbed his mother she would of her own accord comb her hair, and if the heat of Mecca oppressed her, she would herself take shelter.
But Ayyash felt inclined to go. He said:
"I may go for a short while. I will clear my mother of her vow. I have also some money to recover from the people in Mecca which I would like to get."
"I am one of the richest of the Quraish and if you do not go with them, you may have one half of my money."
Ayyash, however, persisted in his wish to go to Mecca once .
Thereupon Umar said:
"If you must go, then take this camel of mine. She is well bred and easy to ride. Don't dismount, and if at any stage you suspect them of treachery, you may well escape on this camel. Then Ayyash left for Mecca on the camel of Umar. After they had proceeded some distance, Jahl said to Ayyash:
"I find my beast hard to ride. Will you not mount me behind you ?"
Ayyash agreed, and when they made their camels kneel to make the change over, Abu Jahl and al-Harith fell on Ayyash and bound him securely. They brought him to Mecca bound and said:
"O men of Mecca deal with your fools as we have dealt with this fool of ours".
When the Holy Prophet came to know how Hisham had been held back and how Ayyash had been abducted, he said:
"Who will bring me Ayyash and Hisham?"
Al-Walid b al-Mughira volunteered to undertake the mission. Al-Walid rode to Mecca and there he came to know that Hisham and Ayyash were kept in custody in a house which had no roof. One night al-Walid climbed the wall and contacted the prisoners who were in fetters. Al-Walid cut the fetters with the strokes of his sword. Then al-Walid led Ayyash and Hisham to Medina.