When and Why Revealed?
The subject matter of this Surah indicates that it was revealed during the last stage of the Holy Prophet's residence at Makkah, when the Quraish were considering the question of killing or exiling or imprisoning him. At that time some of the unbelievers put this question (probably at the instigation of the Jews) to test him :"Why did the Israelites go to Egypt?" This question was asked because they knew that their story was not known to the Arabs for there was no mention of it whatever in their traditions and the Holy Prophet had never even referred to it before. Therefore they expected that he would not be able to give any satisfactory answer to this question or would first evade it, and afterwards try to inquire about it from some Jew, and thus he would be totally exposed. But, contrary to their expectations, the tables were turned on them, for Allah revealed the whole story of Prophet Joseph then and there, and the Holy Prophet recited it on the spot. This put the Quraish in a very awkward position because it not only foiled their scheme but also administered a warning to them by aptly applying it to their case, as if to say, "As you are behaving towards this Prophet, exactly in the same way the brothers of Prophet Joseph behaved towards him; so you shall meet with the same end."
Objects of Revelation
From the above it is clear that this Surah was sent down for two objects:
The first object was to give the proof of the Prophethood of Muhammad (Allah's peace be upon him), and that too, the one demanded by the opponents themselves so as to prove conclusively that his knowledge was not based on mere hearsay, but was gained through Revelation. This aspect has been stated explicitly in its introductory verses and explained plainly in its concluding portion.
The second object was to apply it to the Quraish and warn them that ultimately the conflict between them and the Holy Prophet would end in his victory over them. As they were then persecuting their brother, the Holy Prophet, in the same way the brothers of Prophet Joseph had treated him. The Quraish were told indirectly that they would also fail in their evil designs just as the brothers of Prophet Joseph had failed in his case, even after casting him into the well. This is because none has the power to defeat the Divine will. And just as the brothers of Prophet Joseph had to humble themselves before him, so one day the Quraish shall have to beg forgiveness from their brother whom they were then trying to crush down. This, too, has been made quite plain in v. 7: "Indeed there are signs in this story of Joseph and his brothers for these inquirers from among the Quraish."
The fact is that by applying this story to the conflict, the Quran had made a bold and clear prophecy, which was fulfilled literally by the events that happened in the succeeding ten years. Hardly two years had passed after its revelation, when the Quraish conspired to kill the Holy Prophet like the brothers of Prophet Joseph, and he had to emigrate from Makkah to Al-Madinah, where he gained the same kind of power as Prophet Joseph had gained in Egypt. Again, in the end the Quraish had to humble themselves before him just like the brothers of Prophet Joseph, when they humbly requested, "Show mercy to us for Allah rewards richly those who show mercy" (V. 88), and Prophet Joseph generously forgave them, (though he had complete power to wreak vengeance on them,) saying, " today no penalty shall be inflicted on you. May Allah forgive you:He is the greatest of all those who forgive" (V. 92). The same story of mercy was repeated, when after the conquest of Makkah, the crest fallen Quraish stood meekly before the Holy Prophet, who had full power to wreak his vengeance on them for each and every cruelty committed by them. But instead, he merely asked them, "What treatment do you expect from me now?" They replied, "You are a generous brother and the son of a generous brother." At this, he very generously forgave them, saying, "I will give the same answer to your request that Joseph gave to his brothers: “...today, no penalty shall be inflicted on you: you are forgiven."
English Translation: Noor International