Solomon became king after the death of his father David. According to the biblical book of 1 Kings, when David was " old and advanced in years" "he could not get warm." "So they sought for a beautiful young woman throughout all the territory of Israel, and found Abishag the Shunammite, and brought her to the king."
While David was in this state Adonijah, David's fourth son, acted to have himself declared king, he being heir-apparent to the throne after the death of his elder brothers Amnon and Absalom. But Bathsheba, a wife of David and Solomon's mother, along with the prophet Nathan induced David to proclaim Solomon king. Adonijah fled and took refuge at the altar, and received pardon for his conduct from Solomon on the condition that he show himself "a worthy man" (1 Kings 1:5-53).
Adonijah asked to marry Abishag the Shunammite, but Solomon denied authorization for such an engagement, although Bathsheba now pleaded on Adonijah's behalf. He was then seized and put to death (1 Kings 2:13-25). As made clear in the earlier story of Absalom's rebellion, to have sex with the King's wife or concubine was in this society tantamount to claiming the throne; evidently, this applied even to a woman who had shared the bed of an old, impotent king.
David's general Joab was killed, in accord with David's deathbed request to Solomon because he had killed generals Abner and Amasa during a peace (2 Samuel 20:8-13; 1 Kings 2:5). David's priest Abiathar was exiled by Solomon because he had sided with rival Adonijah. Abiathar is a descendent of Eli, which has important prophetic significance. (1 Kings 2:27) Shimei was confined to Jerusalem and killed three years later when he went to Gath to retrieve some runaway servants in part because he had cursed David when Absalom, David's son, rebelled against David. (1 Kings 2:1-46)