Acceptance of Islam
In relation to Hazrat Ali’s (ra) acceptance of Islam, Ibn Ishaq relates that Hazrat Ali (ra) bin Abi Talib came to the Holy Prophet (sa) a day after Hazrat Khadijah (ra) had accepted Islam and she was now offering prayers alongside the Holy Prophet (sa). The narrator states that upon observing the Holy Prophet (sa) and Hazrat Khadijah (ra) offering prayers, Hazrat Ali (ra) enquired, “O Muhammad (sa), what is this you are doing?” The Holy Prophet (sa) replied, “This is the religion of Allah which He has chosen and has established it through His messengers. Thus, I invite you to Allah and His worship and to denounce Lat and Uzza [idols of the Meccans].”
Upon this, Hazrat Ali (ra) stated, “This is something which I had never heard of till this day. However, I cannot say anything until I have mentioned it to Abu Talib.” The Holy Prophet (sa) did not wish for this matter to be disclosed before his formal announcement of prophethood. And so, the Holy Prophet (sa) stated, “O Ali, even if you do not wish to accept Islam, keep this matter to yourself.”
That very night, Allah inspired the heart of Hazrat Ali (ra) to accept Islam and so, the next morning he presented himself before the Holy Prophet (sa) and submitted, “O Muhammad (sa), what is it that you called me towards yesterday?” The Holy Prophet (sa) stated, “To testify that there is none worthy of worship except Allah. He is One and has no partner. And to denounce belief in Lat and Uzza and express your aversion to those who are held as partners of Allah the Almighty.” Hazrat Ali (ra) gave testimony and accepted Islam.
Fearing Abu Talib, Hazrat Ali (ra) would discreetly visit the Holy Prophet (sa) and kept his acceptance of Islam hidden from others.
(Ali Ibn al-Athir, Usd al-Ghabah fi Ma‘rifat al-Sahabah, Vol. 4, Ali bin Abi Talib [Beirut, Lebanon: Dar al-Kutub al-Ilmiyyah, 2003], 88-89)
According to the narrations, Hazrat Ali (ra) was already staying in the house of the Holy Prophet (sa), but nonetheless, this is how it is narrated in Usdul Ghabha.