In Joshua chapter 2, Rahab lies to the king of Jericho by telling him the spies had already left the city and that the king’s men could track them down and capture them as they returned to the Jordan River. In reality, Rahab was hiding the spies on the roof of her house.
The Bible records that her family was spared by God in Joshua 6, and the New Testament speaks glowingly of her actions in Hebrews 11:31 and James 2:25. How can this be when she clearly lied? Isn’t it always a sin to lie?
Christian thinkers have struggled to deal with this conflict for millennia. Today, there are two positions which garner the most support. Theologians Norman Geisler and Thomas Howe, in The Big Book of Bible Difficulties: Clear and Concise Answers from Genesis to Revelation, explain the two main options for dealing with this passage.
Some argue that it is not clear that God blessed Rahab for lying. God certainly saved Rahab and blessed her for protecting the spies and assisting in the overthrow of Jericho. However, nowhere does the Bible explicitly say that God blessed Rahab for lying. God could have blessed her in spite of her lie, not because of it. . . .
Others insist that Rahab was faced with a real moral conflict. It may have been impossible for her to both save the spies and tell the truth to the soldiers of the king. If so, God would not hold Rahab responsible for this unavoidable moral conflict. Certainly a person cannot be held responsible for not keeping a lesser law in order to keep a higher obligation. The Bible commands obedience to the government (Rom. 13:1; Titus 3:1; 1 Peter 2:13), but there are many examples of justified civil disobedience when the government attempts to compel unrighteousness (Ex. 5; Dan. 3, 6; Rev. 13). The case of the Hebrew midwives lying to save the lives of the male children is perhaps the clearest example.
In summary, the biblical text never explicitly commends Rahab for her lie, so maybe Rahab is commended for her faith in God, despite her lie. Another option is that Rahab acted on the higher moral command (save the lives of the Israelites) over the lower command (do not lie) when she was presented with a situation where two moral laws were in conflict.