What does Psalm 139:24 mean?
David asked the Lord to see if any grievous way was in his heart or mind. "Grievous" here means something which causes pain or sorrow. This is the kind of pain that results from being afflicted because of sin. David wanted his conscience to be free of pain, and of any sense of offending God. Sin has natural, negative consequences. Proverbs 13:15 assures us that "the way of the transgressors is hard" (KJV).In this passage, David also asks God to lead him "in the way everlasting." As David uses it here, this might mean the ancient way that godly men of the past followed. This was the way that led ultimately to everlasting life, not as something to be gained by works but entered by grace. The apostle Paul pursued the way God's will had laid out for him, and at the end of his life he anticipated entering everlasting life in heaven. He testified, "The time of my departure has come. I have fought the good fight, I have finished the race, I have kept the faith. Henceforth there is laid up for me the crown of righteousness, which the Lord, the righteous judge, will award to me on that day, and not only to me but also to all who have loved his appearing" (2 Timothy 4:6–8).
Like David, we should ask the Lord to lead us in this "way everlasting."
Psalm 139:17–24 emphasizes God's justice. Prior sections of this psalm bore witness to God's omniscience (Psalm 139:1–6), His omnipresence (Psalm 139:7–12), and His omnipotence (Psalm 139:13–16). David rejoices in God's thoughts and nearness, but despises the wicked around him. He longs for God to slay them. He sees God's enemies as his own enemies, but is acutely aware of the possibility that sin dwells in him. Therefore, he asks God to search him and lead him in the way everlasting.
In this psalm David marvels at God's amazing characteristics. God knows everything about him: where he goes, all David's thoughts and everything about his conduct. The Lord knows what David will say even before David says it. There is no place David can go that God isn't already present. David marvels at God's creative work in the womb. He is thankful for God's innumerable thoughts for him and for God's presence day and night. Finally, David's thoughts turn to the wicked. He considers them God's enemies and his, and longs for God to slay them. David is disgusted by evil people because they rail against God and take His name in vain. He asks God to search his heart to see if any sin is there, and he asks God to lead him in the way everlasting.