When Muhammad arrived in Medina, all of the inhabitants of the city offered to accommodate him. It is said that he decided instead to allow his camel to walk where it chose and to stay at whomsoever's house it stopped. The camel stopped at the house of Abu Ayyub al-Ansari, a member of the Bani An-Najjar, who were regarded as the best of the tribes of Medina. Though Abu Ayub Al Ansari had prepared meals for only Muhammad and Abu bakr, Muhammad directed that everyone in the neighborhood be invited to partake in the meal. To everyone's surprised delight, all of the approximately 180 people who came were able to eat to their satisfaction. This was deemed to be a miracle.
Madinah Mosque
Waqif of Al-Masjid an-Nabawi: The land of Al-Masjid an-Nabawi belonged to two young orphans, Sahal and Suhayl, and when they came to know that Muhammad wished to acquire their land for the purposes of erecting a mosque, they went to the Prophet and offered the land to him as gift; the Prophet insisted on fixing and paying a price for the land precisely because they were orphaned children. The ultimately agreed purchase price was paid by Abu Ayyub al-Ansari who thus became the واقِف of Al-Masjid an-Nabawi on behalf of, or in favor of, Muhammad.
Following the Muslim conquest of Egypt, Abu Ayyub moved to Fustat, where he lived in a house adjacent to the mosque of Amr bin Al'aas that had been completed in 642. Several other notable companions were his neighbors, including Zubayr ibn al-Awwam, Ubaida, Abu Dhar, Abdullah ibn Umar and Abdullah ibn Amr bin Al'aas. He also led a distinguished military career, regarding which it was said, "He did not stay away from any battle in which the Muslims engaged from the time of Muhammad to the time of Muawiyah, unless he was at the same time, engaged in another battle being fought elsewhere."
In a hadith in Qital al-Rome, a chapter of Sahih Muslim, Muhammad prophesied that the first army to conquer Constantinople will enter Paradise. Muhammad ibn Jarir al-Tabari records a number of raids against the Byzantine Empire under the period A.H. 49. Though Abu Ayyub was by then an old man, that did not deter him from enlisting. Shortly after engaging in battle, it is recorded that he fell ill and had to withdraw. The chief of army staffYazid ibn Muawiya asked, "Do you need anything, Abu Ayyub?" To which Abu Ayyub replied, "Convey my salaams to the Muslim armies and tell them, "Abu Ayyub urges you to penetrate deep into enemy territory, as far as you can go; and that you should carry him with you, and that you should bury me under your feet at the walls of Constantinople." At this, he died. Yazid ordered the Muslim army to fulfill his request, and they pushed back the enemy's forces until they reached the walls of Constantinople where Abu Ayyub was finally interred. About this battle, Aslam ibn 'Imran narrates that when they were fighting the Byzantines, a Muslim soldier penetrated deep into enemy ranks. The people exclaimed, "Subhan Allah! He has contributed to his own destruction." Abu Ayyub al-Ansari stood up and answered, "O people! You give this interpretation to this verse, whereas it was revealed concerning us the Ansar. When Allah had actually given honor to Islam and its supporters had become many, some of us secretly said to one another, 'Our wealth has been depleted, and Allah has given honor to Islam and its supporters have become many, let us stay amidst our wealth and make up what has been depleted of it.' Thereupon, Allah revealed to Muhammad, 'And spend in the Path of God, and do not contribute to your own destruction / And spend in the way of Allah and do not throw with your hands into destruction .'," refuting what we had said. So, destruction lay in staying with our wealth and repleting it and abandoning combat.
Tomb
After the Conquest of Constantinople by the Ottoman Turks, a tomb was constructed above Abu Ayyub's grave and a mosque built in his honor. From that point on, the area now known as the locality of Eyüp has become sacred and many Ottoman officials requested burial in proximity of Abu Ayyub.
Some ''hadith'' narrated by Abu Ayyub
Abu Ayyub al-Ansari is credited with narrating many sayings of Muhammad. Well-known examples of these include:
The Messenger of Allah said: "It is not permissible for a Muslim to shun his brother for more than three nights. When they meet, this one turns away and that one turns away and the best of them is the one who greets his brother first."
Abu Ayyub al-Ansari narrates that on the night of Mi'raj, Muhammad passed by Ibrahim. Ibrahim asked, "O Jibreel, who is with you?" Jibreel answered, "Muhammad." Ibrahim said to him, "Command your Ummah to plant trees of Paradise in abundance, as the soil of Paradise is fertile and its plain is spacious." It was asked, "Which are the trees of Paradise?" He replied, "La hawla wa la quwwata illa billah."