The haftara for Shabbat Parashat Chayei Sara, which is taken from the first chapter of Sefer Melakhim, deals mainly with the revolt led by Adoniyahu, one of King David's older sons. This chapter tells of the efforts made by David's wife Batsheva and the prophet Natan to ensure that David would formally declare Shlomo – Batsheva's son – his successor, as he had promised to Batsheva.
The first verses of this narrative, however, tell the peculiar and seemingly unrelated story of Avishag, the attractive girl brought to the palace to help keep the king warm. As David aged, he found himself unable to keep warm through clothing alone, and his servants therefore brought him Avishag to provide warmth. The verse emphasizes that David did not engage in intimate relations with Avishag (1:4).
The Malbim proposes a surprising theory to explain the relevance of this story to the Adoniyahu narrative. Later, in the second chapter of Sefer Melakhim, we read that after David's death and Shlomo's ascension to the throne, Adoniyahu approached Batsheva and asked that he be allowed to marry Avishag. Batsheva brought his request to Shlomo, who interpreted it as a rebellion against his royal authority, and promptly had Adoniyahu executed. It is generally assumed that Adoniyahu asked to marry Avishag as a means of renewing his efforts to win the kingship. His marriage to Avishag would give him the appearance of David's successor, an image that would help him attract a following and overthrow Shlomo. The Malbim, however, claims that to the contrary, Adoniyahu's rebellion was, from the outset, driven by his desire to marry Avishag. He did not ask for Avishag as a means to rebel; he rebelled as a means to marry Avishag.
Naturally, then, the Torah introduced the story of Adoniyahu's rebellion by telling of David's illness and Avishag's invitation to the palace. It was Avishag's presence in the palace that drove Adoniyahu to the drastic measure of trying to assert himself as David's heir to the throne.
Rav Avraham Rivlin (of Yeshivat Kerem Be'yavneh), in his work Iyunei Haftara, suggests that the Malbim's approach may shed light on Chazal's famous comment concerning the peculiar illness from which David suffered towards the end of his life. The Gemara (Berakhot 62b) remarks that David's inability to warm himself with clothing came as punishment for his having torn a piece of King Shaul's garment many years earlier. As told in Sefer Shemuel I (chapter 24), King Shaul pursued David to kill him and happened to enter a dark cave where David and his men had been hiding. Rather than kill Shaul, David instead secretly cut the corner of his garment that he later used as evidence to Shaul that he was given the opportunity to kill him. The Gemara comments that David was punished for this sign of disrespect towards the king's garments, and later in life David was unable to keep himself warm by wearing layers of clothing.
Rav Rivlin notes that elsewhere in Tanakh, we find that cutting the corner of a garment serves to symbolize the end of a king's reign. Shemuel proclaimed the end of Shaul's reign by cutting his garment (Shemuel I 15:27), and the prophet Achiya prophesied the division of Shlomo's empire by tearing the garment of Yerovam (Melakhim I 11:30). David's tearing of Shaul's garment was perhaps understood in a similar vein, as a symbolic act foreseeing the imminent fall of Shaul's leadership. David was punished for this insult to Shaul by suffering an illness that resulted in Avishag's entry into the palace, an event that precipitated a threat to the stability of David's dynasty.