When David prays, “Create in me a clean heart,” he is asking God for forgiveness. The subtitle to Psalm 51 clarifies the situation: “A psalm of David. When the prophet Nathan came to him after David had committed adultery with Bathsheba.”
Second Samuel 11 tells the sordid tale. King David saw Bathsheba, a married woman, and lusted after her. He summoned her to fulfill his desires. Some time later, she notified him that she was pregnant with his child. David first tried a cover up, and, when that did not work, he arranged for the murder of Bathsheba’s husband. David then married her.
Obviously, David did not have a clean heart after this. He had committed adultery and possibly rape, as the language used in this case is also used of rape; his summoning of and sleeping with Bathsheba was certainly an abuse of royal authority. He then engaged in deception and finally in murder, corrupting others in the process. When it was all done, he thought he had succeeded in covering it up and destroying all the evidence. The last sentence of 2 Samuel 11 tells us, “But the thing David had done displeased the Lord” (verse 27).
In 2 Samuel 12, the prophet Nathan confronts David. He does so using a parable that David could relate to. He told of a rich man who took advantage of a poor man by stealing his only lamb, a pet, which he killed to feed to his guests. David was overcome with anger and exclaimed, “As surely as the Lord lives, the man who did this must die! He must pay for that lamb four times over, because he did such a thing and had no pity” (2 Samuel 12:5–6).
Then Nathan said to David, “You are the man!” (2 Samuel 12:7). Although David had tried to hide his sin, it was eating away at him inside, as he records in Psalm 32:3–4: “When I kept silent [about my sin], my bones wasted away through my groaning all day long. For day and night your hand was heavy on me; my strength was sapped as in the heat of summer.” David admitted to Nathan, “I have sinned against the Lord” (2 Samuel 12:13). He knew he needed a clean heart.
When David was through trying to hide his sin, he confessed it freely. Psalm 51 is that confession and plea for forgiveness. His request “create in me a clean heart” is simply another way of asking for forgiveness and spiritual cleansing. Psalm 51:1–10 is filled with poetic descriptions of forgiveness and cleansing, identified in italics below:
“Have mercy on me, O God,
according to your unfailing love;
according to your great compassion
blot out my transgressions.
Wash away all my iniquity
and cleanse me from my sin.
“For I know my transgressions,
and my sin is always before me.
Against you, you only, have I sinned
and done what is evil in your sight;
so you are right in your verdict
and justified when you judge.
Surely I was sinful at birth,
sinful from the time my mother conceived me.
Yet you desired faithfulness even in the womb;
you taught me wisdom in that secret place.
“Cleanse me with hyssop, and I will be clean;
wash me, and I will be whiter than snow.
Let me hear joy and gladness;
let the bones you have crushed rejoice.
Hide your face from my sins
and blot out all my iniquity.
“Create in me a pure heart, O God,
and renew a steadfast spirit within me.”
Even though David suffered consequences for his sin, which are outlined in 2 Samuel 12, he was forgiven and restored to spiritual fellowship with God. Psalm 32 tells of the great relief that David felt when he confessed, and in this psalm he encourages others to confess their sins as well:
“Blessed is the one
whose transgressions are forgiven,
whose sins are covered.
Blessed is the one
whose sin the LORD does not count against them
and in whose spirit is no deceit.
“When I kept silent,
my bones wasted away
through my groaning all day long.
For day and night
your hand was heavy on me;
my strength was sapped
as in the heat of summer.
“Then I acknowledged my sin to you
and did not cover up my iniquity.
I said, ‘I will confess
my transgressions to the LORD.’
And you forgave
the guilt of my sin.
“Therefore let all the faithful pray to you
while you may be found;
surely the rising of the mighty waters
will not reach them.
You are my hiding place;
you will protect me from trouble
and surround me with songs of deliverance.
“I will instruct you and teach you in the way you should go;
I will counsel you with my loving eye on you.
Do not be like the horse or the mule,
which have no understanding
but must be controlled by bit and bridle
or they will not come to you.
Many are the woes of the wicked,
but the LORD’s unfailing love
surrounds the one who trusts in him.
“Rejoice in the LORD and be glad, you righteous;
sing, all you who are upright in heart!”
Paul uses Psalm 32 as an example of salvation apart from works (Romans 4:6–8). David was forgiven not because of any works he did to earn forgiveness, but simply because he asked in faith. Because of the sacrifice of Christ, any sinner can ask God for forgiveness, that is, for a clean heart, and he will receive it. The apostle John also tells us, “If we claim to be without sin, we deceive ourselves and the truth is not in us. If we confess our sins, he is faithful and just and will forgive us our sins and purify us from all unrighteousness” (1 John 1: 8–9). In spite of all that David did, and all that we do, God is willing to forgive because Jesus paid the penalty that we deserve. No matter how dirty we are, God can create in us a clean heart.