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.
Adoption was forbidden in the fifth year A.H. It has also been said that this was in the fourth year A.H. This year witnessed the Battle of Al-Ahzaab and the marriage of the Prophet, sallallaahu ‘alayhi wa sallam, to Zaynab bint Jahsh . When, he, sallallaahu ‘alayhi wa sallam, married her people said, "Muhammad has married his daughter-in-law!"
In response to that accusation, Allaah, the Exalted, revealed the verses that state the prohibition of adoption in Islam. Allaah, the Exalted, says (what means):
• {Muhammad is not the father of [any] one of your men, but [he is] the Messenger of Allaah and last of the prophets. And ever is Allaah, of all things, Knowing.} [Quran 33:40]
• {...So when Zayd had no longer any need for her, We married her to you in order that there not be upon the believers any discomfort concerning the wives of their adopted sons when they no longer have need of them. And ever is the command of Allaah accomplished.} [Quran 33:37]
• {Call them by [the names of] their fathers; it is more just in the sight of Allaah. But if you do not know their fathers—then they are [still] your brothers in religion and those entrusted to you. And there is no blame upon you for that in which you have erred but [only for] what your hearts intended. And ever is Allaah Forgiving and Merciful.} [Quran 33.:5]
Al-Baghawi commented on the verse that reads (what means): {And He has not made your adopted sons your [true] sons.} [Quran 33:4] saying:
When the Prophet, sallallaahu ‘alayhi wa sallam, married Zaynab bint Jahsh and she had previously been married to Zayd ibn Haarithah (the adopted son of the Prophet, sallallaahu ‘alayhi wa sallam) the hypocrites said, "Muhammad married his daughter-in-law, but forbids people to do so!" Therefore, Allaah, the Exalted, revealed this verse and banned adoption.
Ibn Katheer said, "According to the famous scholarly opinion, the Battle of Al-Ahzaab took place during the fifth year, and it has also been said that it happened during the fourth year." [As-Seerah An-Nabawiyyah]
Ibn ‘Ashoor said, in his commentary on the chapter of Al-Ahzaab (Quran: 33):
"According to the opinion of Abu Is-haaq it was revealed late in the fifth year after Hijrah. This is the opinion adopted by Ibn Rushd in his book Al-Bayan wa At-Tahseel. Ibn Wahb and Ibn Al-Qaasim reported on the authority of Maalik that this happened during the fourth year, when the Battle of Al-Ahzaab took place."
Ibn Al-Qayyim confirmed that it was in the fifth year.
Allaah Knows best.