As we shall see, the story of Zaynab is actually a good piece of evidence for the genuineness of the Prophet (peace be upon him), not for his insincerity like Orientalists and some Christian missionaries like to claim.
Zaynab bint Jahsh married the Prophet Muhammad (peace be upon him) in 5 AH, when she was thirty-five years old, but only after her previous marriage, which had been arranged by none other than the Prophet (peace be upon him), had ended in divorce. Zaynab bint Jahsh was the cousin of the Prophet (peace be upon him). She came from one of the noblest families of Quraysh and was expected to marry a man with the same high social status.
The Prophet (peace be upon him) knew that piety and not social status was the primary consideration in marriage. He wanted her to marry Zayd ibn Hârith, a former slave of Khadîjah who the Prophet (peace be upon him) had freed and adopted as a son at the age of eight.
Prophet Muhammad (peace be upon him) had watched both Zayd and Zaynab grow up, and thought they would make a good couple and that their marriage would demonstrate that it was not who their ancestors were, but rather their religiousness that mattered. When the Prophet (peace and blessings of Allah be upon him) asked for her hand on behalf of Zayd, Zaynab’s family were shocked at the idea of her marrying a freed slave. Moreover, Zaynab had wanted to marry the Prophet (peace be upon him) and in fact her family had already offered to marry her to him.
At first Zaynab refused. Zayd also had reservations about the idea. However, when both he and Zaynab realized that there was no difference between what the Prophet (peace be upon him) wanted and what Allah wanted, they both agreed to the marriage. The Prophet provided a dowry for Zaynab on Zayd’s behalf, consisting of ten dinars, sixty dirhams, a veil, a cloak, a shirt, and a considerable amount of food and dates.
The marriage, alas, was not a success. Zaynab and Zayd proved to be incompatible for each other. After about a year, problems arose between them and Zayd complained about her to the Prophet (peace be upon him), who told him to stay with his wife and fear Allah.
Zayd asked the Prophet (peace be upon him) for permission to divorce Zaynab on more than one occasion, and although the Prophet (peace be upon him) advised Zayd not to divorce her, the divorce ultimately took place. The Prophet (peace be upon him) was then ordered by Allah to marry Zaynab, which he did in 5 AH.
The custom among the pagan Arabs was that an adopted son was like a person’s real son. He carried his adopted father’s name and inherited from him. Islam overturned that custom. Islam, we must understand, came to safeguard lineage. A man may adopt a child and take care of him, but that child cannot assume the lineage of his adopted father. He must retain his own family name.
Allah says: “Nor has He made your adopted sons your sons. Such is only your (manner of) speech by your mouths. But Allah tells you the Truth, and He shows the right way that is correct. Call them by the names of their fathers: that is more just with Allah. But if ye know not their father’s names, (then they are) your brothers in faith, or your wards.” [Sûrah al-Ahzâb: 4-5]
By marrying Zaynab, the Prophet (peace be upon him) demonstrated in the clearest possible way that in Islam an adopted son is not the same as a natural son and that the guardian of an adopted son is permitted to marry a woman who was once married to that adopted son.
As for the verse itself, Allah says: “And (remember) when you said to him on whom Allah has bestowed grace and you have done a favor: ‘Keep your wife to yourself, and have fear of Allah.’ But you did hide in yourself that which Allah will make manifest, you did fear the people whereas Allah had a better right that you should fear Him. So, when Zayd had completed his aim with her, We gave her to you in marriage, so that there may be no difficulty to the believers in respect of the wives of their adopted sons when the latter have no desire to keep them. And Allah's command must be fulfilled.” [Sûrah al-Ahzâb: 37]
Ibn Jarîr narrated that `A’ishah said: “If Muhammad were to have concealed anything that was revealed to him of the Book of Allah, he would have concealed the verse: ‘But you did hide in yourself that which Allah will make manifest, you did fear the people whereas Allah had a better right that you should fear Him’.”
Allah had already revealed to him that Zaynab bint Jahsh was going to be one of his wives. The Prophet (peace be upon him) did not speak about this matter. Then Allah revealed this verse.
This verse is clearly not the statement of a false Prophet making up verses trying to justify his desires. If the Prophet (peace be upon him) had ulterior motives, he could have gone about the matter in a much more subtle way and gotten what he wanted. Instead, he was put on the spot to do something he otherwise would not have wanted to do. The last way we would describe the situation of the Prophet (peace be upon him) here is to call it “convenient”.
This, however, was from Allah’s wisdom. If the Prophet (peace be upon him) had only said to the people that since adopted sons are not true sons, therefore men may marry the ex-wives of their adopted sons, it would not have had the same effect. Cultural practices and taboos are quite strong. For instance, as Muslims we all know that race and ethnicity are not important. However, we can see the problems that almost invariably arise when a Muslim girl wants to marry a Muslim boy from a different ethnic background. Therefore, the Prophet (peace be upon him) was commanded to marry her by way of example.
In the very next verse, Allah continues: “There can be no difficulty upon the Prophet in what Allah has obliged him to do. That was Allah's way with respect to those who have gone before. And the command of Allah is a decree determined.” [Sûrah al-Ahzâb: 38]
You mention the story that the Prophet (peace be upon him) saw Zaynab not fully dressed and became full of desire for her and said something indicating his desire to marry her. Then when Zayd divorced her, the verse was revealed “…you did hide in yourself that which Allah will make manifest, you did fear the people whereas Allah had a better right that you should fear Him…” According to the story, the thing that the Prophet (peace be upon him) was concealing in his heart was his desire to marry Zaynab.
This story is a favorite of the Orientalists and is patently false. Please understand that many people concocted false stories and false hadîth for various reasons. That is the reason why the science of hadîth came about. Hadîth are graded as authentic (sahîh), good (hasan), weak (da`îf), rejected (munkar), and fabricated (mawdû`). This grading is not arbitrary and not according to anyone’s desires. A hadîth is graded based on a study of the chain of transmission by way of which it reached us. If a chain of transmission has gaps in it or contradictions or contains people who were known liars, then the hadîth is not acceptable.
This story is baseless. It does not come to us with any chain of transmission worth mentioning. If we wish to believe this story, we might as well believe anything that people tell us.
This story is found in some books like al-Tabarî’s Tafsîr, but he relates it without any chain of transmission and starts by saying: “It was said that…”
For this reason, Ibn Kathîr does not mention it at all in his commentary of the Qur’ân. In his monumental work on history, al-Bidâyah wa al-Nihâyah, Ibn Kathîr discusses the marriage of Zaynab bint Jahsh and mentions that there were some strange stories circulated by the early scholars, but many of them were dubious and should be abandoned.
Of course, Orientalists and other enemies of Islam gleefully reproduce this story so they can have some dirt to throw on the Prophet (peace be upon him). They fail to mention that the story is baseless and has no claim to authenticity. They just pass it on as fact.