A Commentary, Critical, Practical, and Explanatory on the Old and New Testaments, by Robert Jamieson, A.R. Fausset and David Brown  at sacred-texts.com
2 Kings (2 Samuel) 21:1
sa2 21:1THE THREE YEARS' FAMINE FOR THE GIBEONITES CEASE BY HANGING SEVEN OF SAUL'S SONS. (Sa2 21:1-9)
the Lord answered, It is for Saul, and for his bloody house, because he slew the Gibeonites--The sacred history has not recorded either the time or the reason of this massacre. Some think that they were sufferers in the atrocity perpetrated by Saul at Nob (Sa1 22:19), where many of them may have resided as attendants of the priests; while others suppose it more probable that the attempt was made afterwards, with a view to regain the popularity he had lost throughout the nation by that execrable outrage.
2 Kings (2 Samuel) 21:2
sa2 21:2in his zeal to the children of Israel and Judah--Under pretense of a rigorous and faithful execution of the divine law regarding the extermination of the Canaanites, he set himself to expel or destroy those whom Joshua had been deceived into sparing. His real object seems to have been, that the possessions of the Gibeonites, being forfeited to the crown, might be divided among his own people (compare Sa1 22:7). At all events, his proceeding against this people was in violation of a solemn oath, and involving national guilt. The famine was, in the wise and just retribution of Providence, made a national punishment, since the Hebrews either assisted in the massacre, or did not interpose to prevent it; since they neither endeavored to repair the wrong, nor expressed any horror of it; and since a general protracted chastisement might have been indispensable to inspire a proper respect and protection to the Gibeonite remnant that survived.
2 Kings (2 Samuel) 21:6
sa2 21:6Let seven men of his sons be delivered unto us, and we will hang them up unto the Lord in Gibeah of Saul--The practice of the Hebrews, as of most Oriental nations, was to slay first, and afterwards to suspend on a gibbet, the body not being left hanging after sunset. The king could not refuse this demand of the Gibeonites, who, in making it, were only exercising their right as blood-avengers; and, although through fear and a sense of weakness they had not hitherto claimed satisfaction, yet now that David had been apprised by the oracle of the cause of the long-prevailing calamity, he felt it his duty to give the Gibeonites full satisfaction--hence their specifying the number seven, which was reckoned full and complete. And if it should seem unjust to make the descendants suffer for a crime which, in all probability, originated with Saul himself, yet his sons and grandsons might be the instruments of his cruelty, the willing and zealous executors of this bloody raid.
the king said, I will give them--David cannot be charged with doing this as an indirect way or ridding himself of rival competitors for the throne, for those delivered up were only collateral branches of Saul's family, and never set up any claim to the sovereignty. Moreover, David was only granting the request of the Gibeonites as God had bidden him do.
2 Kings (2 Samuel) 21:8
sa2 21:8the five sons of Michal the daughter of Saul, whom she brought up for Adriel--Merab, Michal's sister, was the wife of Adriel; but Michal adopted and brought up the boys under her care.
2 Kings (2 Samuel) 21:9
sa2 21:9they hanged them in the hill before the Lord--Deeming themselves not bound by the criminal law of Israel (Deu 21:22-23), their intention was to let the bodies hang until God, propitiated by this offering, should send rain upon the land, for the want of it had occasioned the famine. It was a heathen practice to gibbet men with a view of appeasing the anger of the gods in seasons of famine, and the Gibeonites, who were a remnant of the Amorites (Sa2 21:2), though brought to the knowledge of the true God, were not, it seems, free from this superstition. God, in His providence, suffered the Gibeonites to ask and inflict so barbarous a retaliation, in order that the oppressed Gibeonites might obtain justice and some reparation of their wrongs, especially that the scandal brought on the name of the true religion by the violation of a solemn national compact might be wiped away from Israel, and that a memorable lesson should be given to respect treaties and oaths.
2 Kings (2 Samuel) 21:10
sa2 21:10RIZPAH'S KINDNESS UNTO THE DEAD. (Sa2 21:10-11)
Rizpah . . . took sackcloth, and spread it for her upon the rock--She erected a tent near the spot, in which she and her servants kept watch, as the relatives of executed persons were wont to do, day and night, to scare the birds and beasts of prey away from the remains exposed on the low-standing gibbets.
2 Kings (2 Samuel) 21:12
sa2 21:12DAVID BURIES THE BONES OF SAUL AND JONATHAN IN THEIR FATHER'S SEPULCHER. (Sa2 21:12-22)
David went and took the bones of Saul and the bones of Jonathan his son, &c.--Before long, the descent of copious showers, or perhaps an order of the king, gave Rizpah the satisfaction of releasing the corpses from their ignominious exposure; and, incited by her pious example, David ordered the remains of Saul and his sons to be transferred from their obscure grave in Jabesh-gilead to an honorable interment in the family vault at Zelah or Zelzah (Sa1 10:2), now Beit-jala.
2 Kings (2 Samuel) 21:15
sa2 21:15Moreover the Philistines had yet war again with Israel--Although the Philistines had completely succumbed to the army of David, yet the appearance of any gigantic champions among them revived their courage and stirred them up to renewed inroads on the Hebrew territory. Four successive contests they provoked during the latter period of David's reign, in the first of which the king ran so imminent a risk of his life that he was no longer allowed to encounter the perils of the battlefield.
The song contained in this chapter is the same as the eighteenth Psalm, where the full commentary will be given [see on Psa 18:1, &c.]. It may be sufficient simply to remark that Jewish writers have noticed a great number of very minute variations in the language of the song as recorded here, from that embodied in the Book of Psalms--which may be accounted for by the fact that this, the first copy of the poem, was carefully revised and altered by David afterwards, when it was set to the music of the tabernacle. This inspired ode was manifestly the effusion of a mind glowing with the highest fervor of piety and gratitude, and it is full of the noblest imagery that is to be found within the range even of sacred poetry. It is David's grand tribute of thanksgiving for deliverance from his numerous and powerful enemies, and establishing him in the power and glory of the kingdom.