Short answer
The Qur'an tells Joseph's story as it really happened. Genesis 37 does not hold together. In Genesis, Jacob is fooled by the bloody coat and thinks Joseph is dead (Genesis 37:33-35). In the Qur'an, Jacob knows at once that his sons are lying: "your minds have made up a tale" (12:18). Genesis 37 tells two stories at once. In one, Reuben puts Joseph in a pit to save him. In the other, Judah sells him. One verse says Midianites sold Joseph to Potiphar (Genesis 37:36). Another says Potiphar bought him from Ishmaelites (Genesis 39:1). Jewish and Christian scholars have tried to make it fit, but each answer adds things the Bible does not say. The Qur'an tells the story once, step by step (12:10-21). And for Muslims, the Qur'an is the test for the earlier books, not the other way round (5:48).
Full explanation
What Jacob did
In Genesis, the brothers dip Joseph's coat in goat's blood and show it to their father. Jacob believes them. He says, "an evil beast hath devoured him", and he mourns for many days (Genesis 37:31-35). In the Qur'an, the brothers say "the wolf devoured him" and bring his shirt "with false blood". But Jacob is not fooled. He tells them, "your minds have made up a tale" (12:16-18). Years later he says, "I know from Allah that which ye know not" (12:86). He even senses that Joseph is alive before the news comes (12:94). So in the Qur'an, Jacob is a prophet who sees the truth. In Genesis, he is tricked.
“And they took Joseph’s coat, and killed a kid of the goats, and dipped the coat in the blood; And they sent the coat of many colours, and they brought it to their father; and said, This have we found: know now whether it be thy son’s coat or no. And he knew it, and said, It is my son’s coat; an evil beast hath devoured him; Joseph is without doubt rent in pieces. And Jacob rent his clothes, and put sackcloth upon his loins, and mourned for his son many days. And all his sons and all his daughters rose up to comfort him; but he refused to be comforted; and he said, For I will go down into the grave unto my son mourning. Thus his father wept for him.”
“Then they came to their father in the early part of the night, weeping. They said: "O our father! We went racing with one another, and left Joseph with our things; and the wolf devoured him.... But thou wilt never believe us even though we tell the truth." They stained his shirt with false blood. He said: "Nay, but your minds have made up a tale (that may pass) with you, (for me) patience is most fitting: Against that which ye assert, it is Allah (alone) Whose help can be sought"..”
“He said: "I only complain of my distraction and anguish to Allah, and I know from Allah that which ye know not”
“When the caravan left (Egypt), their father said: "I do indeed scent the presence of Joseph: Nay, think me not a dotard."”
The Qur'an's story is clear from start to finish
In the Qur'an, one brother says, "Slay not Joseph". He tells them to throw Joseph into a well instead, where "he will be picked up by some caravan of travellers" (12:10). They all agree (12:15). A caravan comes. A man lowers his bucket into the well and finds Joseph (12:19). Joseph is sold "for a few dirhams", and a man in Egypt buys him (12:20-21). One plan, one well, one caravan. Each step follows from the one before.
“Said one of them: "Slay not Joseph, but if ye must do something, throw him down to the bottom of the well: he will be picked up by some caravan of travellers."”
“Then there came a caravan of travellers: they sent their water-carrier (for water), and he let down his bucket (into the well)... He said: "Ah there! Good news! Here is a (fine) young man!" So they concealed him as a treasure! But Allah knoweth well all that they do! The (Brethren) sold him for a miserable price, for a few dirhams counted out: in such low estimation did they hold him! The man in Egypt who bought him, said to his wife: "Make his stay (among us) honourable: may be he will bring us much good, or we shall adopt him as a son." Thus did We establish Joseph in the land, that We might teach him the interpretation of stories (and events). And Allah hath full power and control over His affairs; but most among mankind know it not.”
Genesis 37 tells two stories at once
Read Genesis 37 slowly and you find the story told twice. Two brothers save Joseph, in two different ways. Reuben says to put him in a pit, so he can take him back "to his father again" (37:21-22). Then Judah has a different idea: "let us sell him to the Ishmeelites" (37:26-27). Two groups of traders turn up. Ishmaelites are coming down the road (37:25). But then Midianite traders pass by, and "they drew and lifted up Joseph out of the pit" (37:28). Reuben goes back to the pit to save Joseph and finds it empty. "The child is not", he cries: Joseph is gone (37:29-30). If the brothers had just sold Joseph together, why did Reuben not know? There are two endings too. The Midianites sell Joseph to Potiphar (37:36). But two chapters later, Potiphar buys him from the Ishmaelites (39:1). Even Joseph tells it both ways. First he says, "I was stolen away" (40:15). Later he tells his brothers he is the one "whom ye sold into Egypt" (45:4).
“And Reuben heard it, and he delivered him out of their hands; and said, Let us not kill him. And Reuben said unto them, Shed no blood, but cast him into this pit that is in the wilderness, and lay no hand upon him; that he might rid him out of their hands, to deliver him to his father again.”
“And they sat down to eat bread: and they lifted up their eyes and looked, and, behold, a company of Ishmeelites came from Gilead with their camels bearing spicery and balm and myrrh, going to carry it down to Egypt.”
“And Judah said unto his brethren, What profit is it if we slay our brother, and conceal his blood? Come, and let us sell him to the Ishmeelites, and let not our hand be upon him; for he is our brother and our flesh. And his brethren were content.”
“Then there passed by Midianites merchantmen; and they drew and lifted up Joseph out of the pit, and sold Joseph to the Ishmeelites for twenty pieces of silver: and they brought Joseph into Egypt.”
“And Reuben returned unto the pit; and, behold, Joseph was not in the pit; and he rent his clothes. And he returned unto his brethren, and said, The child is not; and I, whither shall I go?”
“And the Midianites sold him into Egypt unto Potiphar, an officer of Pharaoh’s, and captain of the guard.”
“And Joseph was brought down to Egypt; and Potiphar, an officer of Pharaoh, captain of the guard, an Egyptian, bought him of the hands of the Ishmeelites, which had brought him down thither.”
“For indeed I was stolen away out of the land of the Hebrews: and here also have I done nothing that they should put me into the dungeon.”
“And Joseph said unto his brethren, Come near to me, I pray you. And they came near. And he said, I am Joseph your brother, whom ye sold into Egypt.”
Answer 1: "Joseph was sold many times"
Rashi, a Jewish commentator who died in 1105, tries to make it fit. He says the brothers sold Joseph to the Ishmaelites, the Ishmaelites sold him to the Midianites, and the Midianites sold him in Egypt. Other rabbis counted four sales, and even five. But no verse says the Ishmaelites sold him to the Midianites. Rashi adds that. The verse says Midianites passed by and "they drew" Joseph out, so Rashi has to say "they" means the brothers. In Rashi's order, the Midianites take Joseph to Egypt. Yet Genesis 39:1 says it was the Ishmaelites who brought him down to Egypt. And why did Reuben not know about the sale? Rashi gives two different guesses: it was his turn to look after his father, or he was away fasting. Genesis says neither.
Rashi, a medieval Jewish commentator, reads the Midianites as another caravan, and says Scripture shows Joseph was sold several times: his brothers drew him from the pit and sold him to the Ishmaelites, the Ishmaelites to the Midianites, and the Midianites into Egypt (after Midrash Tanchuma).
On "And Reuben returned", Rashi says Reuben had not been there when Joseph was sold, and gives two different reasons: it was his turn to attend to his father, or he was busy with sackcloth and fasting in penitence for disturbing his father's couch. Both come from Genesis Rabbah 84:19.
On how the story was composed: by the early 1990s a majority of modern scholars held the Joseph story to be a wisdom novella written by a single author, while others see it as a work with both early and late parts. In Jewish tradition, rabbis read the different names for the sellers as a chain of sales: Rabbi Judah counts four sales, and Rav Huna adds a fifth.
“Then there passed by Midianites merchantmen; and they drew and lifted up Joseph out of the pit, and sold Joseph to the Ishmeelites for twenty pieces of silver: and they brought Joseph into Egypt.”
“And Joseph was brought down to Egypt; and Potiphar, an officer of Pharaoh, captain of the guard, an Egyptian, bought him of the hands of the Ishmeelites, which had brought him down thither.”
Answer 2: "They were the same people"
Others say the Midianites and the Ishmaelites were one people. They point to Judges 8:24, which calls Gideon's Midianite enemies "Ishmaelites". But Genesis 37:28 names them as two groups in the same sentence. Genesis also says they come from two different sons of Abraham, by two different mothers: Midian, his son by Keturah (25:1-2), and Ishmael, his son by Hagar (16:15). And even if they were one people, there would still be two brothers saving Joseph in two different ways. Each answer has to add something the Bible does not say.
“And Gideon said unto them, I would desire a request of you, that ye would give me every man the earrings of his prey. (For they had golden earrings, because they were Ishmaelites.)”
“Then there passed by Midianites merchantmen; and they drew and lifted up Joseph out of the pit, and sold Joseph to the Ishmeelites for twenty pieces of silver: and they brought Joseph into Egypt.”
“Then again Abraham took a wife, and her name was Keturah. And she bare him Zimran, and Jokshan, and Medan, and Midian, and Ishbak, and Shuah.”
“And Hagar bare Abram a son: and Abram called his son’s name, which Hagar bare, Ishmael.”
What some scholars say
Some Bible scholars, such as Richard Elliott Friedman, say Genesis 37 is two older stories joined together by a later editor. In one, Ishmaelites take Joseph to Egypt. In the other, Midianites take him. Each story makes sense on its own. The problems only start when the two are put together. Not all scholars agree on how the chapter was made. But all of them have to explain why it tells so much twice.
Prints the five books with each source marked. In Genesis 37 it assigns the Ishmaelites who take Joseph to Egypt to one source (J) and the Midianites who pull him from the pit and sell him to another (E), joined by a later editor.
On how the story was composed: by the early 1990s a majority of modern scholars held the Joseph story to be a wisdom novella written by a single author, while others see it as a work with both early and late parts. In Jewish tradition, rabbis read the different names for the sellers as a chain of sales: Rabbi Judah counts four sales, and Rav Huna adds a fifth.
The Qur'an judges the Bible, not the other way round
The critic uses Genesis to judge the Qur'an. Islam does the opposite. Allah (﷾) sent the Qur'an "confirming the scripture that came before it, and guarding it in safety" (5:48). The Arabic word for guarding, muhaymin, means a guardian and a witness over it. The Qur'an also explains to the Children of Israel "most of the matters in which they disagree" (27:76). So when the Bible agrees with the Qur'an, Muslims accept it. When it disagrees, the Qur'an is right. When the Qur'an says nothing, the Prophet (ﷺ) told Muslims neither to believe it nor to call it a lie (Sahih al-Bukhari 4485). Genesis 37 shows why. A book that tells the same event in two ways that clash cannot judge a book that tells it once, clearly.
“To thee We sent the Scripture in truth, confirming the scripture that came before it, and guarding it in safety: so judge between them by what Allah hath revealed, and follow not their vain desires, diverging from the Truth that hath come to thee. To each among you have we prescribed a law and an open way. If Allah had so willed, He would have made you a single people, but (His plan is) to test you in what He hath given you: so strive as in a race in all virtues. The goal of you all is to Allah; it is He that will show you the truth of the matters in which ye dispute;”
“Verily this Qur'an doth explain to the Children of Israel most of the matters in which they disagree.”
Abu Hurayra reports that the People of the Book used to read the Torah in Hebrew and explain it in Arabic to the Muslims. The Prophet (ﷺ) told the Muslims neither to believe them nor to call them liars, but to say: we believe in Allah and in what was revealed to us (Qur'an 2:136).
Why would anyone change it?
Critics ask why anyone would change the story. But no reason is needed. The Qur'an says the Children of Israel who broke their covenant "change the words from their (right) places and forget a good part of the message" (5:13). It also warns about "those who write the Book with their own hands" and then say it is from Allah (2:79). Changes can happen by mistake as well as on purpose. When two versions of a story are joined into one book, they leave marks like the ones in Genesis 37. The Qur'an tells the story whole. It says of itself: "It is not a tale invented, but a confirmation of what went before it" (12:111).
“But because of their breach of their covenant, We cursed them, and made their hearts grow hard; they change the words from their (right) places and forget a good part of the message that was sent them, nor wilt thou cease to find them- barring a few - ever bent on (new) deceits: but forgive them, and overlook (their misdeeds): for Allah loveth those who are kind.”
“Then woe to those who write the Book with their own hands, and then say:"This is from Allah," to traffic with it for miserable price!- Woe to them for what their hands do write, and for the gain they make thereby.”
“There is, in their stories, instruction for men endued with understanding. It is not a tale invented, but a confirmation of what went before it,- a detailed exposition of all things, and a guide and a mercy to any such as believe.”
Perspectives
The Qur'an got Joseph's story wrong
Critics say the Qur'an's story of Joseph does not match Genesis, so the Qur'an must be wrong. They also ask why the Jews would ever change their own book.
In Genesis, Jacob thought Joseph was dead. The Qur'an says he knew the truth. So the Qur'an is wrong.
Rebuttal
That uses Genesis to judge the Qur'an. Muslims do it the other way round: the Qur'an guards the earlier books (5:48) and settles what the Children of Israel disagree about (27:76). And Genesis 37 does not even agree with itself. It has two brothers saving Joseph, two groups of traders and two endings (Genesis 37:21-30, 37:36, 39:1).
Rashi explains it: Joseph was sold several times.
Rebuttal
Only by adding things the Bible does not say: an extra sale, and two different guesses about where Reuben was. And his order still clashes with Genesis 39:1, which says it was the Ishmaelites who brought him down to Egypt.
The Midianites and the Ishmaelites were the same people (Judges 8:24).
Rebuttal
Genesis 37:28 names them as two groups in one sentence: "Midianites merchantmen" pass by, and Joseph is sold "to the Ishmeelites". Genesis says they come from two different sons of Abraham, by two different mothers (25:1-2; 16:15). And there would still be two brothers saving Joseph in two different ways.
Why would anyone change such a small detail? There is no reason to.
Rebuttal
No reason is needed. The Qur'an says a good part of the message was forgotten (5:13). And joining two versions of a story into one book is enough to leave marks like these.
The Islamic perspective
The Qur'an tells Joseph's story truly and clearly, once, in one chapter. It is the judge of the earlier books. Where Genesis disagrees, the Qur'an is right, and Genesis 37 itself shows the marks of two stories joined into one.
In the Qur'an, Jacob knows at once that his sons are lying.
The Qur'an's story is clear from start to finish: one plan, one well, one caravan.
Genesis 37 tells how Joseph was taken in two different ways. The answers offered have to add things the Bible does not say.
The Qur'an guards the earlier books and settles what the Children of Israel disagree about.