Scripture does not explain when, how, or why Rahab became a harlot. What Scripture does present about her life, however, displays in a wonderful way the glorious hope that God’s redemption provides for the fallen.
Salvation from Perishing
Hearing what the Lord had done in bringing the Israelites through the Red Sea and how the Israelites were destroying surrounding peoples, Rahab the harlot came to fear the Lord as the true God (Josh. 2:9-11). By faith, she hid two spies who were sent by Joshua to spy out Jericho (Josh. 2:1-21).
Because of what she had done, the Israelites spared her and her entire household when they utterly destroyed Jericho (Josh. 6:17, 21, 23, 25a). Not only was she saved from perishing, but also she continued to live among the Israelites thereafter (Josh. 6:25b).
Rahab went from being a pagan to being a believer in the living and true God! She also became one of the relatively few Canaanites who were allowed to live and become one of His people.
Marriage, Motherhood, and a Glorious Posterity
Rahab was not just spared from unbelief and perishing; she also went from being a harlot to a being married to a prominent Israelite man, Salmon (Matt. 1:5), who was the son of Nahshon (1 Chron. 2:11; Matt. 1:4), a “leader of the sons of Judah” (1 Chron. 2:10)! God thus graciously redeemed her from her unbelief, spared her life, rescued her from the horrors of harlotry, and exalted her to marry into a leading family among His people!
Because Salmon was a member of a leading family, he would certainly have known of Rahab’s past. Yet, he still chose to marry her after she had been initially redeemed. Doing so, he became a gracious agent of God’s glorious continuing redemption of her life!
Moreover, through her marriage to Salmon, Rahab became the mother of Boaz (Matt. 1:5), who became the kinsman-redeemer to Ruth (Ruth 4:13-22)! God thus not only gave Rahab the joys of marriage and motherhood, He also used her son to redeem the life of Ruth, a virtuous Moabite woman who came to trust in the God of Israel, even as Rahab had!
Beyond that, Rahab became the great, great grandmother of King David (Matt. 1:5-6a), and ultimately, she became a foremother of Jesus the Christ (Matt. 1:6b-17)! God redeemed Rahab from harlotry and gave her a glorious posterity of which she could never have imagined!
Mentioned Three Times in the New Testament
Long after Rahab had lived her life and died, God exalted her in another way that she never had any possibility of expecting would ever happen—in addition to the record of her life in the book of Joshua, three New Testament books speak of her in key passages! God thus glorified Rahab in a way that few other women in history have experienced!
In his genealogy of Christ, Matthew writes, “And Salmon begat Booz [Boaz] of Rachab [Rahab]” (Matt. 1:5). Rahab has the unique distinction of being one of only five women named in this genealogy!
The writer of Hebrews commends her faith: “By faith the harlot Rahab perished not with them that believed not, when she had received the spies with peace” (Heb. 11:31). This commendation of Rahab, a former harlot, magnifies the wondrous redemption that God provided for her.
James cites Rahab as an example of someone whose justification was by a living faith that produced works: “Likewise also was not Rahab the harlot justified by works, when she had received the messengers, and had sent them out another way? 26 For as the body without the spirit is dead, so faith without works is dead also” (James 2:25-26). This former harlot’s faith and works were thus exemplary, and God memorialized the glory of His redeeming this fallen woman by mentioning her explicitly in four books of Scripture!
Glorious Hope for the Fallen
The story of Rahab testifies to how great a redemption God has made available for fallen people! Although she once was a Canaanite harlot, she repented and believed in Yahweh as the true and living God.
Because she repented and believed in Him, He redeemed her life in ways that she could never have dreamed of when she was a harlot. Her story provides a glorious hope to fallen people whose lives have been ruined by sin—whether their own, of others, or both.
Moreover, Scripture’s silence about the circumstances of how she became a harlot suggest that God wants fallen people to turn their thoughts away from whatever may have caused them to fall and focus instead on the glorious possibilities of whatever God would see fit to do for them in His redeeming love for them. Like Joseph, who through God’s goodness to him was made to forget the injustices that he experienced at the hands of others (Gen. 41:51-52), God wants fallen people to be delivered from bondage to their past.
If you are a fallen person, God offers you this glorious hope through repentance toward Him and faith in Jesus Christ. Turn to Him in faith and He will redeem your life for His glory and your good, both in this life and the life to come!
 Nahshon was “Aaron’s brother-in-law (Ex. 6:23; AV gives ‘Naashon’), son of Amminadab and prince of Judah (Nu. 1:7; 2:3; 7:12, 17; 10:14; 1 Ch. 2:10)” (New Bible Dictionary, 809).