Psalm 40:3 (ESV)

3 He put a new song in my mouth, a song of praise to our God. Many will see and fear, and put their trust in the LORD.

Due to this glorious rescue, the author started singing. He calls it a new song. It indicates that there is healing from being in a precarious situation. We may speak of starting over, having new opportunities; that is what he sings about. Soem commentators think that it is the Lord that gives this new song, in which we may then think of inspiration. Perhaps we can connect the two: the author is glad about the rescue; he feels that the Lord gives him new opportunities (life instead of death). Then, inspired by the Holy Spirit, he starts singing a song, a new song.

His perspective does not linger on himself and his personal rescue. He voices the wish that many people will be brought along in his joy, and also look to the Lord in awe and trust. Look what the Lord has done, listen well to my song, and allow the Lord to bless your relationship with him as well.

Psalm 33:3 reads, Sing to him a new song; and Psalm 96:1, “Oh sing to the Lord a new song; sing to the Lord, all the earth!” In the New Testament we also see something of this going from old to new in Jesus Christ. We read in 1 John 2:7–8: “Beloved, I am writing you no new commandment, but an old commandment that you had from the beginning. The old commandment is the word that you have heard. At the same time, it is a new commandment that I am writing to you, which is true in him and in you, because the darkness is passing away and the true light is already shining.” John broadly draws the double commandment to love. Through the coming of Christ, this has become a new commandment. In Christ we see the new of God's salvation and work!