All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
You have to know, may Allaah The Almighty guide you and us to the righteous path and make us and you a reason in guiding people to Islam, that the Ummah(Muslim nation) unanimously agreed that all prophets, may Allaah exalt their mention, are infallible regarding the conveying of the Divine Message and also do not commit major sins. As for minor sins, most scholars are of the opinion that they commit them but if they did they were not left to persist therein; rather, they hastened to repent therefrom. Consequently, this refutes what this young Christian man claims concerning the contradictions between the verses and the Hadeeths (narrations), and what affirms the infallibility of the prophets, may Allaah exalt their mention.
Also, this includes a reply to his question about the sins that have been forgiven for Muhammad, sallallaahu ‘alayhi wa sallam, and the killing of the Egyptian man by Moosa (Moses) .
As for the sin of Prophet Ibraaheem (Abraham) Ibn Hajar mentioned it while explaining the Hadeeth of intercession and said,
“In the narration reported by Hammaam, ‘I have told three lies’, Shaybaan added in his narration his (i.e. Ibraaheem ) saying, ‘Verily, I am ill’; and his saying, ‘The largest of them did it’; and his saying to his wife, ‘tell him that I am your brother’. Actually, these are not sins at all for it is authentically narrated that the Messenger of Allaah, sallallaahu ‘alayhi wa sallam, said: “(There was) not one of those lies but he used to defend the religion of Allaah The Almighty.”
The difference between the sin of the wife of Al-‘Azeez and those of the prophets, may Allaah exalt their mention, is actually different in many aspects:
First, she sought to seduce her slave boy to commit fornication with her, which is a major sin while what was mentioned of the sins of the prophets, may Allaah exalt their mention, only mentions their committing minor sins but never committing major sins.
Second, she insisted on her sin and did not repent from it even after the women of the city knew of it and she sent for them and said, as the Quran states (what means): {And if he will not do what I order him, he will surely be imprisoned.} [Quran 21:32] while the prophets, may Allaah exalt their mention, never persisted in their minor sins; rather, they hastened to repent therefrom.
Third, she sought to seduce Yoosuf (Joseph) only to satisfy her lust; on the other hand, whenever the prophets, may Allaah exalt their mention, did something wrong, it was always a kind of reasoning or in defence of the religion of Allaah The Almighty, and that is clearly apparent in the sins of Prophet Ibraaheem .
Allaah Knows best.