The Qur'an devotes a single surah to the story and introduces it as the most beautiful of narrations, then tells it as one continuous sequence rather than as episodes distributed through a longer history, which is unusual in the Qur'an and has made the surah a favourite subject for commentary, poetry and painting across the Islamic world. Several details differ from the biblical account. The father recognises the danger in the dream at once and warns the boy not to tell his brothers. The brothers plan the killing, are talked down to the cistern by one of them, and return with the false blood on the shirt, at which their father says that their souls have enticed them into something and that beautiful patience is what remains to him.
The best known addition comes in Egypt. The women of the city gossip about the desire of the officer's wife for a servant, so she invites them to a banquet, gives each of them a knife and a piece of fruit, and calls him in; they cut their hands without noticing, and she asks whether they now understand. The episode has no biblical counterpart and became one of the most frequently illustrated scenes in Persian and Mughal manuscript painting. The surah also closes differently: the father's sight, lost through weeping, is restored when the shirt is laid on his face, and the family bows before Joseph as the dream had shown, with the dream's fulfilment named explicitly. Christian tradition has read Joseph typologically as a figure of Christ, betrayed by his own and raised to save them, a reading found from the patristic period onward.