Muhammad had an adopted son named Zayd, who was called "Zayd bin Muhammad" ("Zayd, son of Muhammad"). One day, Muhammad went to visit him and was greeted by Zayd's wife, Zaynab, who was extremely attractive, and who was wearing very little clothing at the time. Here's what happened according to al-Tabari:
She jumped up in haste and excited the admiration of the Messenger of God, so that he turned away murmuring something that could scarcely be understood. However, he did say overtly: "Glory be to God the Almighty! Glory be to God, who causes hearts to turn!" (The History of al-Tabari, Volume VIII, p. 2)
When Zayd found out that Muhammad was attracted to his wife, he decided to divorce her. Muhammad, of course, was worried about what people might think, so he told Zayd to keep his wife for himself. However, Zaynab learned that Muhammad was attracted to her, and she began despising her husband. Zayd, wanting to give his adopted father whatever he desired, divorced his wife.
Muhammad was still worried about what people might think if he married Zaynab, but then he began receiving revelations to justify the marriage. He received Surah 33:37, which reads:
Behold! Thou didst say to one who had received the grace of Allah and thy favour: "Retain thou (in wedlock) thy wife, and fear Allah." But thou didst hide in thy heart that which Allah was about to make manifest: thou didst fear the people, but it is more fitting that thou shouldst fear Allah. Then when Zayd had dissolved (his marriage) with her, with the necessary (formality), We joined her in marriage to thee: in order that (in future) there may be no difficulty to the Believers in (the matter of) marriage with the wives of their adopted sons, when the latter have dissolved with the necessary (formality) (their marriage) with them. And Allah's command must be fulfilled.
Allah wanted Muhammad to marry Zaynab was so that future generations of Muslims would know that it's okay for Muslims to marry the divorced wives of their adopted sons. Here we may start to wonder, "Is this a problem men struggle with? Is this problem so significant among men, that Allah needed not only to put this verse into his eternal Word, but also to have his prophet marry the divorced wife of his own adopted son?" Inquiring minds want to know.
Muhammad's special revelation didn't keep people from criticizing him for marrying Zaynab, so he conveniently received another revelation, Surah 33:4-5, which says that adopted sons aren't really sons. Since adopted sons aren't really sons, Zaynab wasn't really his daughter-in-law, and no one should criticize his marriage to her. The passage reads:
Allah has not made for any man two hearts in his (one) body: nor has He made your wives whom ye divorce by Zihar your mothers: 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. Call them by (the names of) their fathers: that is juster in the sight of Allah. But if ye know not their father's (names, call them) your Brothers in faith, or your Mawlas. But there is no blame on you if ye make a mistake therein: (what counts is) the intention of your hearts: and Allah is Oft-Forgiving, Most Merciful.
From that point on, Zayd was no longer called Muhammad's son, and Muhammad and Zaynab lived happily ever after (at least, until Muhammad died an agonizing death after being poisoned by a Jewish woman whose family had been slaughtered by invading Muslims).
But think carefully about what just happened. Allah desperately needed men to understand that it's okay to marry the divorced wives of their adopted sons, so he ordered Muhammad to marry Zaynab. But then Allah outlawed adoption, which means that men will never have adopted sons, and therefore will never worry about whether they should marry the divorced wives of their adopted sons. It seems that Allah sent Muhammad on a wild goose chase (and ended, for Muslims, one of man's noblest and most humane traditions).
For more on the Zaynab scandal, see these articles:
Sam Shamoun, "Zaid, Zaynab, and Muhammad"
Sam Shamoun, "Muhammad, Zaid, and Zaynab Revisited"