Problem: Muslim apologists note that Genesis 22:2 states, “Take now your son, your only son, whom you love, Isaac.” But Abraham clearly had two sons: Ishmael and Isaac. Why would this text state that Isaac was his only son? Muslim scholar Yusuf Ali argues,
The Jewish tradition, in order to glorify the younger branch of the family, descended from Isaac, ancestor of the Jews, as against the elder branch, descended from Ismael, ancestor of the Arabs, refers this sacrifice to Isaac (Genesis 22:1-19). Now Isaac was born when Abraham was 100 years old (Gen 21:5), while Ishmael was born to Abraham when Abraham was 86 years old (Gen 16:16). Ishmael was therefore 14 years older than Isaac. During his first 14 years Ishmael was the only son of Abraham; at no time was Isaac the only son of Abraham. Yet, in speaking of the sacrifice, the Old Testament says (Gen 22:2): “And He said, Take now thy son, thine only son Isaac, whom thou lovest, and get thee into the land of Moriah: and offer him there for a burnt offering…” This slip shows at any rate which was the older version, and how it was overlaid, like the present Jewish records, in the interests of a tribal religion.
Solution:Was the book of Genesis doctored by the Jewish people to make Isaac the chosen heir of Abraham, rather than Ishmael?
We can resolve this objection, when we consider the context for this passage: Chapter 21. Here we find that Ishmael and Hagar were legally separated from Abraham. Sarah demanded of Abraham, “Drive out this maid [Hagar] and her son [Ishmael], for the son of this maid shall not be an heir with my son Isaac” (Gen. 21:10). Later, God told Abraham, “Through Isaac your descendants shall be named” (Gen. 21:12), and God promises to build a nation through Ishmael also (v.13). After being legally separated, Ishmael has no contact with his father, Abraham, until his burial in Genesis 25:5.
This event in Genesis 22 was not a mistake. In fact, God had predicted that he would choose Isaac—not Ishmael—for his plan (Gen. 17:19-21). He even predicted them by name. From God’s point of view, he had only provided one son for Abraham—not two. Ishmael was a creation of works—not faith.
 Yusuf Ali, The Holy Qur’an, p. 1205. Found here.
“And he said, Take now thy son, thine only son Isaac, whom thou lovest, and get thee into the land of Moriah; and offer him there for a burnt offering upon one of the mountains which I will tell thee of. (Gen 22:2)”