R. A. Huebner says
There is a fact to be observed with attention in the book of Genesis the special blessing is not given to the firstborn son. This setting begins with Cain and is seen in every case where there is sufficient information given so that this phenomenon in Genesis may be observed. We should see in this a foreshadow that God’s purpose is to set aside the firstborn. (God’s Sovereignty and Glory in the Election and Salvation of Lost Men, p. 31, downloaded 2016-09-05)Galatians 4:21–24 supports his view that there is an allegorical truth here.
1 Corinthians 15:42–49 give two descriptions of Christ in contrast to Adam: there is the "last Adam" (v. 45) and the "second man" (v. 47). The "last Adam" carries the idea that Christ is the end of Adam's race, the "second man" carries the idea that Christ is the start of something new.
We see the same pattern in Matthew 27:15–23. Pilate presents Barabbas and Jesus in that order. Of course the crowd chose the first man over the second Man.
Their choice of the first over the second carries on the pattern from Genesis. When Joseph saw that Israel's right hand was on Ephraim's head, it was "evil in his eyes" (Genesis 48:17). Joseph wanted his older son to get the older son's blessing (quite naturally!). Jacob chose the second over the first (v. 20)
When God told Abraham that He would give him a second son (Genesis 17:15–21), Abraham's response was "Oh that Ishmael would live before You" (v. 18). This is remarkable: God is telling Abraham that He would provide the "son of promise" (Galatians 4:28), but Abraham wants the "son according to flesh" (Galatians 4:23) to please God. God certainly promised to bless Ishmael, but He insisted it was Isaac with whom He would establish a permanent covenant (vv. 20–21).
Let's pause and say that it was good and right for Abraham to long for Ishmael to please God. And we don't want to downplay the blessing of God on Ishmael. But we want to see the truth of Galatians 4 here: these things have an allegorical sense, and the Spirit of God is teaching us something in this story.
By the time we come to Genesis 22:2, we have God referring to Isaac as Abraham's "only son". God is no longer acknowledging the first man, only the second.
I fall into the trap of Abraham again and again, as I suspect most of us do. I long to see the "first man" walk with God. What I fail to see is that God is no longer acknowledging that man: He only acknowledges the "second Man." I, like Abraham, have to see that God is now dealing with the son of promise, not the son of flesh.
If you look at Facebook, or listen to so much so-called Christian ministry, you'll see people say things like, "we have two natures within us, the one we feed is the one that grows." I suppose there's a grain of truth there, but it's not at all what Scripture actually teaches. Scripture teaches that in God's sight, there is only the second Man. When we start down the path of thinking we have a choice between "two natures", we leave the teaching of Scripture behind. We aren't to choose between two natures, we are to consider ourselves to have died (Romans 6:11), and to be entirely new creatures (2 Corinthians 5:17). Of course I'm not denying that we have "the flesh" in us, but we are to consider that as a dead thing (Galatians 5:24). To think of ourselves as some sort of umpire between two warring sides is to give a place to "the flesh" that Scripture doesn't give it. J. N. Darby wrote,
Other differences have disappeared: there remains but the old man, which we only acknowledge as dead, and the new man. [emphasis added] (J. N. Darby, Synopsis of the Books of the Bible, Volume 5, last checked 2016-09-05)
So this is a challenge to me: don't fall into the trap of Genesis 17:18. Don't think the "first man" will walk before God. He won't. Don't think God will acknowledge anyone except the "second Man". God has found in Christ what He was looking for, and He's stopped looking. My only place before God is "in Christ", which means I've given up on myself (Philippians 3:9), and – by extension – on Adam's race.