← Psalms: All Chapters

Verse-by-Verse Commentary

The Book of Psalms

Chapter 40: Lo, I Come to Do Thy Will

Psalm 40 begins in a pit and rises to the throne of self-giving obedience. David tells how he waited on the LORD and was lifted out of the miry clay, his feet set on a rock, a new song put in his mouth. Then the psalm opens into one of its greatest heights: words that the New Testament places on the lips of Christ Himself, 'Lo, I come... I delight to do thy will, O my God.' God never wanted the blood of bulls and goats; He wanted a willing servant, and that Servant came in Jesus, whose obedient offering of Himself is the true sacrifice that takes away sin. Here is rescue turned to song, and song turned to the surrendered obedience that saves the world.

About This Commentary

This is a verse-by-verse study of Psalm 40, which moves from rescue to a new song to the obedience of Christ. For each section you will find the KJV text, the Hebrew words that sharpen the meaning, plain explanation, and a Gospel Focus. Every Scripture quotation is from the King James Version.

Out of the Pit

He Set My Feet Upon a Rock (Psalm 40:2)

From sinking in the mire to standing and walking on the rock.

Psalm 40:2

And Established My Goings

"He brought me up also out of an horrible pit, out of the miry clay, and set my feet upon a rock, and established my goings."

Word Study

"horrible pit," Hebrew bor sha'on (בּוֹר שָׁאוֹן), a pit of roaring, of tumult or destruction. David pictures his trouble as a pit, a place where there is nothing to stand on and every effort to climb out only sinks him deeper. The Hebrew adds a sound to the sight: the pit roars around him.

"miry clay," tit hayyaven (טִיט הַיָּוֵן), mud that sucks and holds. The floor of the pit is worse than the pit. The mud grips the feet, so that the very ground he stands on is what holds him down.

"rock," sela (סֶלַע), a crag, solid footing. Out of that helplessness God lifts him and sets his feet on the exact opposite of the clay: a crag, solid footing that neither sucks nor shifts.

"established," konen (כּוֹנֵן), made firm, steadied. God does four distinct things, each further than the last: He brought him up, out of the pit, out of the clay, and then set his feet on a rock and steadied his steps. It is not enough to be standing on rock; God also makes the standing firm.

Explanation

Trace the four stages, because they are a sequence, not a repetition. First God "brought me up" out of the pit, the rescue from below. Then "out of the miry clay," freed from what was still gripping his feet. Then "set my feet upon a rock," given solid footing where before there was none. And finally "established my goings," steadied not just to stand but to walk. The clay and the rock are exact opposites: one sucks the feet down and holds, the other bears weight and holds firm. And notice where the rescue ends, in motion. God does not merely haul the sinking man to safety and leave him standing still; He establishes his "goings," his walk, his onward steps. Salvation that stops at rescue is only half the story; God lifts us out of the mire in order to set us walking on the rock.

Gospel Focus

"He set my feet upon a rock, and established my goings", the Rock on which God sets the rescued sinner is Jesus Christ, and the walk He establishes is the new life in Him. We were sinking in a pit we could not climb out of, "dead in trespasses and sins" (Ephesians 2:1), the miry clay of our own guilt gripping us fast; and God reached down and lifted us out, "not by works of righteousness which we have done, but according to his mercy he saved us" (Titus 3:5). He set our feet on "that Rock... Christ" (1 Corinthians 10:4), the sure foundation on which the house stands when the floods come (Matthew 7:24-25), so that the believer can say, "he only is my rock and my salvation" (Psalm 62:2). And He established our goings, for salvation issues in a walk: we are "created in Christ Jesus unto good works... that we should walk in them" (Ephesians 2:10). So Christ does not merely rescue us from the pit and leave us; He sets us on Himself, the Rock, and steadies every step of the new life. If your feet have found that Rock, you stand where the mire can never pull you down again, and you walk a path God Himself has made firm.

A New Song

He Hath Put a New Song in My Mouth (Psalm 40:3)

Private rescue becomes a public song that draws others to trust.

Psalm 40:3

Many Shall See It, and Fear

"And he hath put a new song in my mouth, even praise unto our God: many shall see it, and fear, and shall trust in the LORD."

Word Study

"new song," Hebrew shir chadash (שִׁיר חָדָשׁ). The rescue produces a song, and not an old one: "he hath put a new song in my mouth." A new deliverance calls for a new note of praise; the God who does fresh things gives fresh songs.

"put," vayyitten (וַיִּתֵּן), gave, set. The song is not something David worked up for himself; it was given to him and set in his mouth by the same God who lifted him from the pit.

"fear," yir'u (יִרְאוּ), stand in awe. And the song does not stay private: "many shall see it, and fear." The word is not terror but awe -- the response of onlookers who realize what God has done.

"trust," yivtechu (יִבְטְחוּ), lean on, rely. Awe turns into reliance: they "shall trust in the LORD." One man's rescue, sung aloud, becomes a testimony that turns others to God.

Explanation

Follow the chain of effects, because it runs outward from one man to a crowd. God rescues David; God puts a song in David's mouth; and then "many shall see it, and fear, and shall trust in the LORD." The song is not the end of the rescue but its overflow, and the overflow is evangelistic. Notice the sequence in the onlookers: they "see," then "fear," then "trust." They watch what God did for one man, they are struck with awe, and awe turns them to lean on the same God. This is how personal deliverance was meant to work, not hoarded as a private comfort but sung where others can hear, so that one soul's story becomes many souls' faith. The phrase "new song" itself begins here a thread that runs to the very end of the Bible, where the redeemed of every nation sing "a new song" before the throne (Revelation 5:9); every rescued sinner adds a voice to that swelling chorus.

Gospel Focus

"He hath put a new song in my mouth", the new song of the redeemed is the song of salvation in Jesus Christ, and it is still drawing many to trust. Every soul that Christ lifts from the pit is given a new song, for the old life had nothing to sing; and that song, the testimony of what the Lord has done, is one of the great means by which others come to faith, "they overcame him by the blood of the Lamb, and by the word of their testimony" (Revelation 12:11). When the delivered believer tells and sings what Christ has done, onlookers see, and fear, and trust, exactly as the psalm foretold. This is the pattern of the Gospel's spread: not first by argument but by the visible rescue of changed lives and the new song on their lips. And the song reaches its consummation in glory, where the countless multitude redeemed "out of every kindred, and tongue, and people, and nation" sing "a new song" to the Lamb who was slain (Revelation 5:9). So let your rescue become a song, and sing it where others can hear; the God who put a new song in your mouth uses it to put faith in another's heart.

Lo, I Come

I Delight to Do Thy Will, O My God (Psalm 40:6-8)

Words the New Testament places on the lips of Christ.

Psalm 40:6-8

In the Volume of the Book It Is Written of Me

"Sacrifice and offering thou didst not desire; mine ears hast thou opened: burnt offering and sin offering hast thou not required. Then said I, Lo, I come: in the volume of the book it is written of me, I delight to do thy will, O my God: yea, thy law is within my heart."

Word Study

"desire," Hebrew chafatzta (חָפַצְתָּ), delight in, take pleasure in. God declares what He never truly wanted: "Sacrifice and offering thou didst not desire... burnt offering and sin offering hast thou not required." The endless animals of the altar were never the thing God took pleasure in.

"mine ears hast thou opened," oznayim karita li (אָזְנַיִם כָּרִיתָ לִּי), literally "ears thou hast dug (or bored) for me". What He wanted instead is named in a striking phrase. God sought not slaughtered beasts but a hearing, obedient servant -- ears dug open to listen.

"Lo, I come," hinneh vati (הִנֵּה־בָאתִי). The response to opened ears is total self-offering. Instead of leading an animal to the altar, the servant presents himself: "Lo, I come."

"volume of the book," megillat sefer (מְגִלַּת סֵפֶר), the scroll of the book. The coming is not improvised; it is written of him already in the scroll. What he offers has been recorded before he offers it.

"thy will," retzonekha (רְצוֹנֶךָ). And the offering is obedience gladly given: "I delight to do thy will, O my God: yea, thy law is within my heart." What God delights in is answered by a servant who delights in God's will.

Explanation

The odd phrase "mine ears hast thou opened", literally "ears thou hast dug (or bored) for me", carries a picture the first readers would have caught at once. Under the law, a bondservant who loved his master and did not wish to go free had his ear bored through with an awl at the doorpost, marking him a servant for life by his own glad choice (Exodus 21:5-6). So the opened, bored ear is the badge of the willing servant, one who has chosen to obey out of love, not compulsion. That is what God always wanted more than sacrifice: not the blood of animals a man could bring while his heart stayed far off, but a listening ear and a surrendered will. And see where obedience is located in these verses, in the ear that hears and the heart where the law is kept, "thy law is within my heart", never in the mere ritual of the altar. God was never after the offering in a man's hands; He was after the man himself.

Gospel Focus

"Lo, I come... I delight to do thy will, O my God", the New Testament takes these very words and puts them on the lips of Jesus Christ as He came into the world. The letter to the Hebrews quotes this passage in full and applies it to the incarnation: "when he cometh into the world, he saith, Sacrifice and offering thou wouldest not, but a body hast thou prepared me... Then said I, Lo, I come... to do thy will, O God" (Hebrews 10:5-7). The willing Servant whose ear was opened is the Lord Jesus, who came not to bring another animal to the altar but to offer Himself, His own prepared body, in perfect obedience to the Father's will. And Hebrews draws the conclusion that saves us: "by the which will we are sanctified through the offering of the body of Jesus Christ once for all" (Hebrews 10:10). The endless sacrifices could never take away sin; the one obedient self-offering of Christ does. He is the true bondservant who delighted to do God's will, with the law not merely on His hands but within His heart, and by that surrendered obedience, culminating at the cross, He accomplished the salvation the old altars only pictured. So the deepest note of this psalm is the voice of Christ Himself: "Lo, I come to do thy will", the obedience of the Son that lifts us out of the pit and puts the new song in our mouths.

Psalm in Review

Psalm 40 rises from a pit to the obedience that saves the world. David waited on the LORD and was lifted "out of an horrible pit, out of the miry clay," his feet set on a rock and his steps established, rescue that ended not in standing still but in walking. Out of that deliverance God put "a new song" in his mouth, a song that overflows outward so that "many shall see it, and fear, and shall trust in the LORD." And the psalm climbs to its height in words the New Testament places on the lips of Christ: God never desired the blood of bulls and goats, but a willing servant with an opened ear, and so the Servant answers, "Lo, I come... I delight to do thy will, O my God." Hebrews applies this to Jesus, who came to offer not another animal but His own body in perfect obedience, "by the which will we are sanctified... once for all." Every strand is fulfilled in Him: the Rock on whom we are set, the new song of the redeemed, and the obedient Son whose self-offering takes away sin. Psalm 40 teaches us to wait on the God who lifts us from the mire, to turn our rescue into a song that draws others, and to bow before the willing Servant, Jesus Christ, whose "Lo, I come" is the ground of our salvation.

Key Takeaways

  • Rescue ends in a walk. God lifts us from the mire to set us walking firmly on the Rock.
  • The new song is evangelistic. One man's rescue, sung aloud, turns many to trust the LORD.
  • God wanted a servant, not slaughter. The opened ear is the badge of willing, loving obedience.
  • Obedience lives in the ear and heart. "Thy law is within my heart," not merely in ritual.
  • "Lo, I come" is the voice of Christ. His obedient self-offering takes away sin once for all.

Questions for Reflection

  • Have your feet been set on the Rock, Christ, out of the miry clay?
  • Has God turned your rescue into a walk, not just a standing still?
  • Do you sing your new song where others can see, fear, and trust?
  • Is your obedience the willing kind, an opened ear and a surrendered will?
  • Do you rest your whole salvation on Christ's "Lo, I come to do thy will"?

References

  • Scripture: Psalm 40:1-17, King James Version (commentary focuses on verses 2, 3, and 6-8).
  • Cross-references: Exodus 21:5-6; Psalm 62:2; Matthew 7:24-25; 1 Corinthians 10:4; Ephesians 2:1, 10; Titus 3:5; Hebrews 10:5-10; Revelation 5:9; 12:11.
  • Hebrew word meanings: standard lexical sources (Strong's, BDB) for bor sha'on ("horrible pit"), tit hayyaven ("miry clay"), shir chadash ("new song"), and karah oznayim ("open, dig the ears"); the fulfilment of verses 6-8 in Christ (Hebrews 10:5-10).
How Can I Be Saved?