(David to Solomon) And keep the charge of the Lord your God: to walk in His ways, to keep His statutes, His commandments, His judgments, and His testimonies, as it is written in the Law of Moses, that you may prosper in all that you do and wherever you turn; 1 Kings 2:3
David’s charge to Solomon: 2:1-12. After a time of co-rule, David is near death. He gives his final instructions to his son. “Show yourself a man,” David commands, and underlines the need to keep all of God’s commandments wholeheartedly (2-4). David also instructs Solomon to deal with several of his old enemies.
Solomon’s control established: 2:13-46. After David dies Adonijah maneuvers for another try at the throne. He asks through Solomon’s mother to marry one of David’s concubines — a girl who cared for David in his last months (1-4). By custom, a king’s concubines are part of the inheritance of his heir (cf 2 Sam. 16:21). Such a marriage would provide basis for a later claim to Solomon’s throne by the popular (1 Kings 2:15) Adonijah. Solomon immediately puts Adonijah to death for treason. There is no indication Solomon harmed other brothers.
15 Then he said, “You know that the kingdom was mine, and all Israel had set their expectations on me, that I should reign. However, the kingdom has been turned over, and has become my brother’s; for it was his from the Lord.
22 And King Solomon answered and said to his mother, “Now why do you ask Abishag the Shunammite for Adonijah? Ask for him the kingdom also–for he is my older brother–for him, and for Abiathar the priest, and for Joab the son of Zeruiah.” 23 Then King Solomon swore by the Lord, saying, “May God do so to me, and more also, if Adonijah has not spoken this word against his own life! 24 Now therefore, as the Lord lives, who has confirmed me and set me on the throne of David my father, and who has established a house  for me, as He promised, Adonijah shall be put to death today!” 25 So King Solomon sent by the hand of Benaiah the son of Jehoiada; and he struck him down, and he died.
Solomon finds ways to deal with his fathers enemies — Abiathar, Joab and Shimei.
27 So Solomon removed Abiathar from being priest to the Lord, that he might fulfill the word of the Lord which He spoke concerning the house of Eli at Shiloh.
–> When Abiathar was removed from office as a priest, his influence was greatly restricted. Solomon spared Abiathar’s life in recognition of his past service to God and David (2 Sam. 15:24 29:1 Chr. 15:11-15). With this act God’s word to Eli came to fulfillment. Eli’s descendants were removed from serving the Lord (1 Sam. 2:30-33).
28 Then news came to Joab, for Joab had defected to Adonijah, though he had not defected to Absalom. So Joab fled to the tabernacle of the Lord, and took hold of the horns of the altar. 29 And King Solomon was told, “Joab has fled to the tabernacle of the Lord; there he is, by the altar.” Then Solomon sent Benaiah the son of Jehoiada, saying, “Go, strike him down.”
42 Then the king sent and called for Shimei, and said to him, “Did I not make you swear by the Lord, and warn you, saying, ‘Know for certain that on the day you go out and travel anywhere, you shall surely die’? And you said to me, ‘The word I have heard is good.’ 43 Why then have you not kept the oath of the Lord and the commandment that I gave you?” 44 The king said moreover to Shimei, “You know, as your heart acknowledges, all the wickedness that you did to my father David; therefore the Lord will return your wickedness on your own head.
Death of David
10 So David rested with his fathers, and was buried in the City of David. 11 The period that David reigned over Israel was forty years; seven years he reigned in Hebron, and in Jerusalem he reigned thirty-three years.
–> At the end of his rule in Jerusalem for 33 years, judgements on David’s enemies finally came. They must have thought that their day of reckoning would never come. But it did!