Genesis 18 divides the two sections:
1) The promise to Sarah of a son (verses 1-15).
2) The intercession of Abraham for Sodom (verses 16-33).
Yahweh Himself with the two angels appears to Abraham, who offers hospitality, at first not realising their identity. The promise of Isaac's birth is overheard by Sarah who laughs at it, and is rebuked for doing so. The Lord knows the thoughts of the heart - knowing the difference in her laugh to that of Abraham's in Chapter 17.
As the Lord and the angels look toward Sodom, the Lord decided to take Abraham into His counsel about the coming destruction of Sodom (Genesis 18:17-19 ). There follows the intercession to spare the cities. He asks should there be 50 righteous in the city, would the Lord spare them. He was answered Yes. He kept dropping the numbers and stopped at 10, and again got the answer Yes. Probably Abraham thought with Lot's household there would be 10 righteous. But he was wrong. We have the supernatural help of the Holy Spirit who indwells and fills us (Romans 8:26-27 ).
Genesis 19 gives a dramatic account of the destruction of Sodom and Gomorrah, to which the Lord Jesus referred as an illustration of the day of judgment to come (Luke 17:28-30 ).
The angels arrived in Sodom, are entertained in Lot's house (Genesis 19:1-3 ). The angels are the object of a vile and brutal attack which endangered Lot himself. When a city is given to homosexuality like Sodom, no newcomers are safe (Genesis 19:5 ). Even Lot's questionable offer of his virgin daughters was unacceptable to such depraved men (Genesis 19:6-7 ). Only the intervention of the angels delivered Lot out of their hands (Genesis 19:10-11 ). Lot was urged by the angels to leave the city (Genesis 19:12-17 ). He failed to persuade any of his family to accompany him except his wife and the two unmarried daughters. During the escape his wife disobeys and is overwhelmed with salt and lost. (Genesis 19:26 ). Lot begged to be allowed to go to Zoar and was permitted (Genesis 19:18-29 ). Immediately on his entry the guilty cities were destroyed by a conflagration witnessed by Abraham (Genesis 19:27-29 ). Feeling insecure, Lot withdrew with his daughters to a cave, and he is last seen in degrading circumstances, helpless in the hands of his wicked daughters (Genesis 19:30-36 ).
The nation of Moabites meaning 'from the father', came of this incest. This chapter teaches the certainty of the destruction of wicked cities and the wicked. It also shows the miserable end and failure of the life of worldly professing Christians.
Abraham does full circle in making the same mistake he made in Egypt, when he began his sojourn in the promised land. (Genesis 20:1-2; 12:10-20 ). In each case he gave way to the fear of man (Proverbs 29:25 ). It seems surprising after so many promises, and walking with God for such a long time, and able to believe what was humanly impossible. What warning not to be taken up with the circumstances, but to be wholly taken up with the Lord. Eyes off the Lord can bring the most spiritual into trouble.
Genesis 20:3 shows the gracious intervention of God, warning Abimelech in a dream (See Genesis 20:4-7 ).
Sarah must be restored. (Genesis 20:7 ). This is the first time the word "prophet" is used - a mouthpiece for God. Abimelech is told the prophet Abraham would pray for him and he would live. Prayer is one of the main functions of a prophet. Abraham's prayer brought healing to the household of Abimelech (Genesis 20:17- 18 ). In our Christian living it is well to remember we are continually kept by the power of God.
Genesis 21 first gives an account of Isaac's birth (Genesis 21:1-8 ). The name commemorates Abraham's outburst of triumphant faith - Isaac means "laughter."
More trouble comes to Abraham's tent that leads to the expulsion of Hagar and Ishmael (Genesis 21:8-21 ). God once again intervenes on their behalf, and His promise concerning Ishmael fulfilled. It is a touching story of God's overruling providence.
This is the testimony of Abimelech concerning Abraham (Genesis 21:22 ). Then a covenant is made at Beersheba between Abraham and Abimelech (Genesis 21:22-33 ). There are many important lessons in this chapter.
The first lesson.
The second lesson.
The third lesson.
Genesis 22 is certainly the climax of the story of Abraham's life. It brings him to his final test of his faith, and when it is over, the story of Abraham draws to a close. Read the chapter carefully and learn:
4.12. ABRAHAM'S CIRCUITOUS EVENTS AT GERAR (Genesis 20)
4.12.1. "SHE IS MY SISTER" (Genesis 20:2)
4.12.2. "BUT GOD CAME TO ABIMELECH"
4.12.3. "FOR HE IS A PROPHET"
4.13. ABRAHAM'S CONSUMMATED PROMISE OF ISAAC'S BIRTH
(Genesis 21)
4.13.1. "CAST OUT THE BONDWOMAN" (Genesis 21:10)
4.13.2. "GOD IS WITH YOU IN ALL THAT YOU DO"
God never fails to do what He has promised, even when it is impossible in the natural sphere.
God will overrule man-made plans and fulfil His covenant.
In the covenant between Abraham and Abimelech we have an illustration of a covenant and its meaning.
4.14. ABRAHAM'S CLIMATIC TEST OF FAITH (Genesis 22)

That the final test of faith is a readiness to abandon and devote all to God. For Abraham it meant his Isaac. He devoted him to God in amazing faith. Read Hebrews 11:17-19 . 
The chapter also gives a vivid picture of the devotion of the Father for His only Son for the redemption of the world. 
There is a beautiful type of substitutionary atonement, (Genesis 22:13 ), the ram instead of Isaac. Christ has been offered in the sinner's stead, bearing the guilt and punishment due the sinner (Isaiah 53:5 ). He was made a curse for us (Galatians 3:12 ). Abraham named the place 'Yahweh-Jireh' meaning, 'the Lord will see or provide' (Genesis 22:14 ).
God saw our needs from all eternity and provided for them by sending His Son (Romans 8:3 ) to die in our place (Matthew 20:28 ), that the chastisement of our peace might be upon Him (Isaiah 53:5 ), He provided the Lamb of God for us (John 1:29 ).