Abdul Muttalib’s vow (aka how the prophet's father almost died)
Abdul Muttalib met difficulties when searching for the well of Zamzam, the bitterest of which was the mocking of Quraysh at him and then their dispute with him on the treasure that he found. He felt that that was because of his weakness and the little children he had. Therefore, he vowed to Allah that if he would have ten children and when they would be adults, he would slaughter one of them at the Kaaba for the sake of Allah as his grandfather Abraham (a.s.) had done when he had finished building the Kaaba. And indeed, Allah endowed him with ten males; al-Harith, az-Zubayr, Hajl, Dhirar, al-Muqawwam, Abu Lahab, al-Abbas, Hamza, Abu Talib, and Abdullah, and some females; Safiyyah, Wabrah, Aatikah, Umm Hakeem, (Ajbahah), and Arwa.
Abdul Muttalib’s wish came true and he had ten males. Then, he had to fulfill his vow. He gathered his sons and told them about his vow. They all submitted and showed their obedience to their father. He chose by lot and it was Abdullah, the Prophet’s father and the most beloved to his father, who was to be slaughtered. Abdul Muttalib took Abdullah to the Kaaba to slaughter him there.The people of Quraysh hasten to him saying, “By Allah, you should not slaughter him. O Abul Harith, if you do, it shall be a custom followed by your people, and every man will bring his son to slaughter him here."
Abdul Muttalib said, “I have promised my Lord and I will fulfill what I have promised Him…”
Some other men tried to convince him to change his determination. They asked him to go to a diviner in Khaybar and to do whatever the diviner would tell him. Abdul Muttalib responded to them and went to the diviner. The diviner asked, “How much is the blood money among you?”
Abdul Muttalib said, “Ten camels (for a man).”
The diviner said, “Go back to your country and then offer a sacrifice for your man (Abdullah). Offer ten camels and draw lots on him and on the camels. If the lots fall on your man, then add other ten camels, and so on until your Lord will be pleased. When the lots fall on the camels, then you slaughter them and so your Lord will be pleased and your man will be saved…”
Abdul Muttalib went back to Mecca. He draws the lots on his son and camels, and in the tenth time the lots fell on the camels. People glorified Allah and cried out, “O Abdul Muttalib, your Lord is pleased.” Abdul Muttalib ordered one hundred camels to be slaughtered between the Safa and the Marwa, and ordered a caller to call the people of Mecca to come to take some meat and they hurried from everywhere.
Abdullah was saved from slaughter as his grandfather Ishmael had been saved before.
— The life of Muhammad, Baqir Shareef al-Qurashi
(Bolded the important parts so it is easier to read. and that is how our Prophet's father lived to conceive this immaculate man. Indeed Allah works in mysterious ways. )