Verses 1–7
Second Samuel - Chapter 22
David Calls on God, vs. 1-7
If the words of verse one are to be taken in context within the Book of Second Samuel, the reference to David’s deliverance from all his enemies would be to the cessation of wars near the end of his life. However the reference to being delivered from the hand of Saul suggests it may have been uttered early in David’s reign, and be referring to an earlier period of tranquillity. The early assignment seems preferable. The message is the same for the present day regardless of when it was uttered.
Notice the many things the Lord was to David: 1) rock, 2) fortress, 3) deliverer, 4) God of my rock, 5) horn of salvation, 6) Savior, 7) shield. The rock indicates strength and immovability; the fortress, his shelter and hiding place from the world; his deliverer, out of dangers of the world. As the God of his rock the Lord kept David secure from evil; the horn of salvation means the power by which salvation is secured and maintained; Savior refers to literal salvation, genuine source of redemption; shield refers to his means of turning away temptation.
David acclaimed the Lord for saving him from violence. He vowed to call on Him as worthy of praise, and the one who saved him for his enemies. During his flight from his enemies David had trusted the Lord to save him. In his trouble he felt like a man lost in the sea with the waves about to overwhelm him. His floods were the ungodly men who sought his life, and are represented in such as King Saul and the giant Ishbi-benob who tried to kill him. The "sorrow of hell" means David’s fear of the unknown which comes at death, especially as terrifying to the flesh. Many times it seemed death had him in its snare and would not prevent, or go from, him. In these times of distress, however, he turned to the Lord, whose ear was open, and who heard his cry from His heavenly temple (Cf. 1 Peter 3:12).