Ibrahim prayed, "My Lord, grant me a child from among the righteous," and Allah gave him the glad tidings of a forbearing boy (37:100–101). Ismaʿil was born to Ibrahim and Hajar when Ibrahim was already old; Ibrahim later praised Allah, "who has given me, in my old age, Ismaʿil and Ishaq" (14:39).
An authentic hadith in Sahih al-Bukhari tells how Ibrahim brought Hajar and the infant Ismaʿil, still nursing, to the barren valley of Makkah, near where the House would stand, and left them with a bag of dates and a skin of water. Hajar asked him, "Has Allah commanded you to do this?" He said yes. She said, "Then He will not abandon us." Out of their sight, Ibrahim turned and prayed: "Our Lord, I have settled some of my offspring in a valley without crops, near Your Sacred House… so make the hearts of people incline towards them, and provide them with fruits, so that they may be grateful" (14:37) (Sahih al-Bukhari 3364).
When the water ran out, Hajar ran between the hills of Safa and Marwah seven times looking for help; the Prophet ﷺ said this is why people walk between them. Then an angel struck the ground, and the water of Zamzam gushed out for mother and child. People of the tribe of Jurhum saw birds circling over the water and asked to settle there, and Hajar welcomed them. Ismaʿil grew up among them, learnt Arabic from them, and married from them. The same hadith tells how, after Hajar died, Ibrahim visited and guided his son through his wives: he told him to part with a wife who complained about their life, and to keep one who thanked Allah (Sahih al-Bukhari 3364).
When the boy was old enough to work alongside his father, Ibrahim told him: "O my son, I have seen in a dream that I am sacrificing you, so tell me what you think." He replied: "O my father, do as you are commanded. You will find me, if Allah wills, among the patient" (37:102). When both had submitted and Ibrahim laid him down on his forehead, Allah called out that he had fulfilled the vision, and ransomed the son with a great sacrifice (37:103–107). The stronger view, held by Ibn Kathir and many scholars, is that this son was Ismaʿil, because the glad tidings of Ishaq are given only after this story (37:112). Muslims remember this obedience every year at Eid al-Adha.
Later, father and son built the Kaʿbah together. In the hadith, Ismaʿil brought the stones while Ibrahim built, and when the walls rose high Ibrahim stood on a stone to continue (Sahih al-Bukhari 3364). As they raised its foundations they prayed: "Our Lord, accept this from us; You are the All-Hearing, the All-Knowing" (2:127). They asked Allah to make them and their descendants Muslims, to show them their rites, and to send a messenger from among their offspring to recite His verses and teach the Book and wisdom (2:128–129). Allah had charged them both to purify His House for those who circle it, stay there in worship, bow and prostrate (2:125).
The Quran praises Ismaʿil: "He was true to his promise, and he was a messenger and a prophet. He used to command his family to pray and give zakah, and he was pleasing to his Lord" (19:54–55). He is named among the patient (21:85), among the best of people (38:48), and among those Allah favoured above the worlds (6:86), and revelation came to him as it came to the other prophets (2:136; 4:163). Encouraging archery, the Prophet ﷺ said: "Shoot, children of Ismaʿil, for your father was an archer" (Sahih al-Bukhari 2899).
Allah chose the Prophet Muhammad ﷺ from Ismaʿil's descendants: from them He chose Kinanah, then Quraysh, then Banu Hashim, and then him (Sahih Muslim 2276) — the answer to the prayer of Ibrahim and Ismaʿil. The Quran does not give details of Ismaʿil's later mission, his age, or how his life ended. Reports that he is buried in the Hijr (al-Hatim) beside the Kaʿbah are not confirmed by authentic hadith.