Psalms 40
Psalm 40 opens in the patient hush that comes after a long ordeal, not during it: I waited patiently for the LORD; and he inclined unto me, and heard my cry. The waiting is over; God has bent down and listened; and now David tells what it was like to be rescued. The images are unforgettable - an horrible pit, the miry clay that swallows the feet and gives nothing to push against, and then the firm rock, the steadied step. Anyone who has been stuck - in grief, in sin, in a trouble with no visible bottom - knows exactly the difference between clay and rock under the feet. And out of that deliverance God does something characteristic: He puts a new song in David's mouth. The rescue is not meant to be hoarded; it is meant to be sung, so that many shall see it, and fear, and shall trust in the LORD.3
Then the psalm climbs to its astonishing center. Sacrifice and offering thou didst not desire… burnt offering and sin offering hast thou not required. In the world of the tabernacle and the temple, where the whole rhythm of worship moved to the offering of bulls and lambs, this is a staggering thing to say. It does not mean the sacrifices were worthless; it means they were never the point. They were pictures, pointing past themselves to the one thing God always wanted more - a person who would truly hear Him and gladly obey. Mine ears hast thou opened, David says: the ear dug open to listen, the whole self made ready to do God's will. And the answer rises out of that opened ear in the most willing words in the Psalter: Then said I, Lo, I come… I delight to do thy will, O my God: yea, thy law is within my heart.
For three thousand years readers have felt that these words reach beyond David - that no merely human obedience ever fully matched them. The book of Hebrews says so plainly, taking verses 6 through 8 and placing them on the lips of Christ as the words He spoke coming into the world: a body hast thou prepared me… Lo, I come to do thy will, O God (Heb. 10:5-7).2 He is the obedience the sacrifices were pointing toward. And yet the psalm refuses to leave us in the clouds of that perfection. Its second half drops back down to honest ground: innumerable evils have compassed me about… I am poor and needy. The same song holds both - the perfect Lo, I come and the desperate make haste to help me - because the obedience at its center is exactly what the need at its close was crying out for. Psalm 40 teaches us to sing the new song from the rock, to long for obedience that is delight and not drudgery, and to bring our still-unfinished selves to the One who alone has done the will of God whole.
Tap any highlighted phrase to jump to the commentary that unpacks it.

Psalm 40:1-5 · To the chief Musician, A Psalm of DavidHe Brought Me Up Out of an Horrible Pit
1I waited patiently for the LORD; and he inclined unto me, and heard my cry. 2He 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. 3And 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. 4Blessed is that man that maketh the LORD his trust, and respecteth not the proud, nor such as turn aside to lies. 5Many, O LORD my God, are thy wonderful works which thou hast done, and thy thoughts which are to us-ward: they cannot be reckoned up in order unto thee: if I would declare and speak of them, they are more than can be numbered.
The psalm begins on the far side of a rescue, looking back. I waited patiently for the LORD; and he inclined unto me, and heard my cry. Notice that the waiting comes first, and that it was not a quick thing - the verb is doubled in the Hebrew, “waiting I waited,” the language of a long holding-on. But the waiting was not wasted and it was not ignored; in the end God inclined unto him - literally bent down, stooped low, the way you lean down to catch the voice of someone small. Then come the images that have given this psalm its power. David had been in an horrible pit - a pit of tumult, of roaring confusion - and in the miry clay, that particular horror of mud that pulls the feet down and offers nothing solid to push against. The harder you struggle, the deeper you sink. And against that he sets two quiet miracles of stability: God set my feet upon a rock, and established my goings. First the standing, then the walking. The One who lifts us out does not leave us trembling on the bank; He gives us back our footing and sets us moving again.
Out of the rescue comes music: he hath put a new song in my mouth, even praise unto our God. The song is given, not generated - he hath put it there - and it is new because the old song belonged to the pit, and the man who climbs out of the mud is not the same man who fell in. A new mercy calls for a new music. But watch where the new song travels: many shall see it, and fear, and shall trust in the LORD. One man's deliverance, sung honestly, becomes a doorway for others. They see what God did for him; a healthy fear - reverence, awakened wonder - falls on them; and that awe turns into trust, the very trust the next verse pronounces blessed: Blessed is that man that maketh the LORD his trust. This is how testimony works in the family of God. Your rescue was never only about you. The song God puts in your mouth is meant to be overheard, so that someone still in the clay can lift their eyes and begin, against all the evidence of their own pit, to hope.
Before the psalm turns to its great center, David widens the frame from his own story to God's whole way of working: Many, O LORD my God, are thy wonderful works which thou hast done, and thy thoughts which are to us-ward: they cannot be reckoned up in order unto thee. His single rescue, he realizes, is one bead on an endless string. God's works toward His people are past counting, and behind the works are His thoughts - His intentions, His designs to us-ward, bent in our direction. There is something deeply steadying in this. The same God who reached into one man's pit has a countless history of such reaching, and a mind full of plans tilted toward the good of His people. If I would declare and speak of them, they are more than can be numbered. The right response to one mercy is to remember that it stands in a flood of mercies - and that the God who has done so much, and thinks so constantly toward us, is not likely to stop now.
Psalm 40:6-10Lo, I Come to Do Thy Will
6Sacrifice and offering thou didst not desire; mine ears hast thou opened: burnt offering and sin offering hast thou not required. 7Then said I, Lo, I come: in the volume of the book it is written of me, 8I delight to do thy will, O my God: yea, thy law is within my heart. 9I have preached righteousness in the great congregation: lo, I have not refrained my lips, O LORD, thou knowest. 10I have not hid thy righteousness within my heart; I have declared thy faithfulness and thy salvation: I have not concealed thy lovingkindness and thy truth from the great congregation.
Now the psalm says the thing that turns the whole temple on its head: Sacrifice and offering thou didst not desire… burnt offering and sin offering hast thou not required. To an Israelite this is almost vertigo. The altar, the priesthood, the daily smoke of the offerings - the entire visible machinery of approaching God ran on sacrifice. How can the psalmist say God did not desire it? The answer is not that the sacrifices were a mistake, but that they were never the destination. They were God's own appointed pictures, given to teach a people what sin costs and what nearness requires - and like all pictures, they pointed beyond themselves. The prophets had been saying it for centuries: to obey is better than sacrifice, and to hearken than the fat of rams (1 Sam. 15:22); I desired mercy, and not sacrifice (Hos. 6:6). What God always wanted, underneath the smoke, was not a substitute offered instead of the worshipper, but the worshipper himself - heart, ears, hands, the whole obedient person. The danger the verse exposes is timeless: it is fatally possible to keep the religious motions running flawlessly while withholding the one thing they were meant to draw out of us.
The obedience of the opened ear does not stay shut up inside; it opens the mouth too. I have preached righteousness in the great congregation: lo, I have not refrained my lips… I have not concealed thy lovingkindness and thy truth from the great congregation. Four times over the psalmist insists on what he has not done - not refrained, not hid, not concealed - piling up the negatives to make a single positive point: he could not keep quiet. The same heart that delights to do God's will cannot help but declare God's character. And notice the place: the great congregation, out in the open, before the gathered people, not whispered in a corner. Real love for God is finally unhideable. When His righteousness, His faithfulness, His salvation, His lovingkindness, and His truth have actually reached a person, silence becomes the harder thing. The progression of the psalm is worth tracing: God opened the ear (v. 6), the opened ear led to a willing heart (v. 8), and the willing heart opens the lips (vv. 9-10). Hearing, obeying, and proclaiming turn out to be one continuous life.
Psalm 40:11-17I Am Poor and Needy; Yet the Lord Thinketh upon Me
11Withhold not thou thy tender mercies from me, O LORD: let thy lovingkindness and thy truth continually preserve me. 12For innumerable evils have compassed me about: mine iniquities have taken hold upon me, so that I am not able to look up; they are more than the hairs of mine head: therefore my heart faileth me. 13Be pleased, O LORD, to deliver me: O LORD, make haste to help me. 14Let them be ashamed and confounded together that seek after my soul to destroy it; let them be driven backward and put to shame that wish me evil. 15Let them be desolate for a reward of their shame that say unto me, Aha, aha. 16Let all those that seek thee rejoice and be glad in thee: let such as love thy salvation say continually, The LORD be magnified. 17But I am poor and needy; yet the Lord thinketh upon me: thou art my help and my deliverer; make no tarrying, O my God.
The psalm now makes a turn that can feel abrupt, and is in fact one of its truest notes. The voice that just sang I delight to do thy will drops, in the same breath, to a plea: Withhold not thou thy tender mercies from me, O LORD: let thy lovingkindness and thy truth continually preserve me. And look at what he asks to be preserved by - the very things he has just been preaching: God's lovingkindness and truth were what he declared in the great congregation (v. 10), and now they are what he begs to keep him alive. This is no contradiction; it is the wholeness of real faith. The one who proclaims God's mercy to others is the same one who, an hour later, desperately needs that mercy himself. He does not pretend the obedience of verses 6 through 8 has lifted him above need. He turns the truth he preaches into the prayer he prays - and that is exactly how it is meant to be used.
Then comes the honest weight of it: innumerable evils have compassed me about: mine iniquities have taken hold upon me, so that I am not able to look up; they are more than the hairs of mine head: therefore my heart faileth me. Two kinds of trouble close in at once - evils from without, pressing on every side, and iniquities from within, his own failings catching up with him. Earlier the psalm rejoiced that God's mercies were more than can be numbered (v. 5); now, with terrible symmetry, his sins are more than the hairs of mine head. He cannot even lift his eyes; his courage drains away. It is striking, and deliberate, that the same song which holds the perfect Lo, I come also holds this - a man undone by his own sin and unable to look up. The two are not rivals; they are the whole truth about us. We are people made to delight in God's will and people whose iniquities take hold of us, and the gap between the two is precisely why the willing obedience at the center of this psalm had to be supplied, at last, by Another. The honest confession of verse 12 is the very thing that the Lo, I come of verse 7 came to answer.
Out of that low place rise the most undefended prayers in the psalm: Be pleased, O LORD, to deliver me: O LORD, make haste to help me. There is no eloquence left here, only urgency - make haste, hurry, the prayer of someone who cannot hold on much longer. These verses (13-17) are nearly word for word the whole of Psalm 70, as if this cry were so needed it had to be lifted out and given a song of its own. The psalmist asks for two things: that those who seek after my soul to destroy it would be turned back, and - far more warmly - that all those that seek thee would rejoice and be glad in thee. Notice the contrast he draws: there are those who seek his soul, and those who seek God, and he longs for the second company to be filled with gladness, continually saying, The LORD be magnified. Even flat on the ground, unable to look up, his desire is not merely for his own rescue but for God to be made great among all who love Him. The pit has not narrowed his heart to himself.
Further study
- The Hebrew text of Psalm 40 with Rashi, Ibn Ezra, and other classical commentators side by side - useful for the intensive qavoh qivviti (v. 1, “waiting I waited”), the striking idiom oznayim karita li (v. 6, “ears hast thou dug / opened for me”), and chaphets (v. 8, “to delight in, to take pleasure in”).
- Psalm 40 ↔ Hebrews 10 · Psalm 70 · 1 Samuel 15Intertextual BibleTraces the verbal threads tying Psalm 40's “Lo, I come” to its great fulfillment in Hebrews 10:5-10, its near-duplicate in Psalm 70 (vv. 13-17), and the prophets' refrain that God desires obedience above sacrifice (1 Sam. 15:22; Hos. 6:6).
- Psalm 40 - Translators' NotesNET BibleThe NET Bible's detailed footnotes on Psalm 40 - the “pit” and “miry clay” as images of near-death trouble, the “new song” of the rescued, and the much-discussed relationship between the Hebrew “opened ears” (v. 6) and the Greek “a body hast thou prepared me” that Hebrews 10 follows.
Where this echoes in Scripture
He Brought Me Up Out of an Horrible Pit
- Psalm 30:3O LORD, thou hast brought up my soul from the grave... that I should not go down to the pit.The pit (v. 2) is also the grave - the language Scripture uses for rescue from death.
- Isaiah 40:31They that wait upon the LORD shall renew their strength; they shall mount up with wings as eagles.The same qavah / waiting (v. 1) that ends not in disappointment but in renewed strength.
- Revelation 5:9And they sung a new song... for thou wast slain, and hast redeemed us to God by thy blood.The new song (v. 3) in its final form - the praise of all the rescued, led by the Lamb.
- Psalm 69:2I sink in deep mire, where there is no standing: I am come into deep waters.The miry clay (v. 2) named from the inside - the helplessness God reaches into.
Lo, I Come to Do Thy Will
- Hebrews 10:5-10A body hast thou prepared me... Lo, I come... to do thy will, O God... by the which will we are sanctified.The New Testament places vv. 6-8 on the lips of Christ - the obedience that ends all sacrifice.
- 1 Samuel 15:22To obey is better than sacrifice, and to hearken than the fat of rams.The prophets’ refrain behind v. 6: God always wanted the obedient self, not the substitute.
- Jeremiah 31:33I will put my law in their inward parts, and write it in their hearts.The promise fulfilled in “thy law is within my heart” (v. 8) - obedience from the inside out.
- John 4:34My meat is to do the will of him that sent me, and to finish his work.The “Lo, I come” of vv. 7-8 lived out: doing God’s will as the Son’s very food.
I Am Poor and Needy; Yet the Lord Thinketh upon Me
- 2 Corinthians 8:9Though he was rich, yet for your sakes he became poor, that ye through his poverty might be rich.The One of “Lo, I come” became poor and needy (v. 17) Himself, to make us rich.
- Psalm 70:1Make haste, O God, to deliver me; make haste to help me, O LORD.Verses 13-17 are nearly a whole psalm of their own - Psalm 70, the bare cry for help.
- Psalm 34:6This poor man cried, and the LORD heard him, and saved him out of all his troubles.The poor and needy one (v. 17) is exactly the one God draws near to hear.
- Matthew 5:3Blessed are the poor in spirit: for theirs is the kingdom of heaven.The gospel keeps the shape of v. 17 - the kingdom opens first to the poor and needy.