Let’s begin by reading the verse you referred to.  1 Kings 2:23 says, “Then king Solomon sware by Jehovah, saying, God do so to me, and more also, if Adonijah hath not spoken this word against his own life.” 

To understand why Solomon was so angry at Adonijah, his brother, let’s go back and read 1 Kings 2:12-18, “Then sat Solomon upon the throne of David his father; and his kingdom was established greatly. And Adonijah the son of Haggith came to Bath-sheba the mother of Solomon. And she said, Comest thou peaceably? And he said, Peaceably. He said moreover, I have somewhat to say unto thee. And she said, Say on. And he said, THOU KNOWEST THE KINGDOM WAS MINE, and that all Israel set their faces on me, that I should reign: howbeit the kingdom is turned about, and is become my brother’s: for it was his from the LORD. And now I ask one petition of thee, deny me not. And she said unto him, Say on. And he said, Speak, I pray thee, unto Solomon the king, (for he will not say thee nay,) that he give me Abishag the Shunammite to wife. And Bath-sheba said, Well; I will speak for thee unto the king.” 

David had just passed away, and Solomon assumed the throne of his father.  Adonijah, Solomon’s brother, was also a son of David, but not the son of Bathsheba. (2 Samuel 3:4).  1 Kings 1:1 says, “Now king David was old and stricken in years…”  Adonijah, who may have been David’s oldest son at the time of his death, desired to succeed his father as king.  In 1 Kings 1:5 we learn, “Then Adonijah the son of Haggith EXALTED HIMSELF, saying, I WILL BE KING: and he prepared him chariots and horsemen, and fifty men to run before him.”  In order to accomplish this, Adonijah recruited Joah, the captain of the army, and Abiathar the priest to help him in his scheme to be king. (Verse 7).

The Lord determined that Solomon should succeed his father, as we read in 1 Chronicles 22:9-10, “Behold, a son shall be born to thee, who shall be a man of rest; and I will give him rest from all his enemies round about: for his name shall be Solomon, and I will give peace and quietness unto Israel in his days. He shall build an house for my name; and he shall be my son, and I will be his father; and I will establish the throne of his kingdom over Israel for ever.”

When Adonijah came to Bathsheba, although he thought he should be king, he did acknowledge the Lord had given the throne to Solomon.  Thinking that Solomon would not refuse his mother’s request, Adonijah asked her to petition Solomon to give him Abishag to be his wife.  In David’s latter days, Abishag was his caregiver and it is said she “cherished the king and ministered to him” (1 Kings 1:4).  It was pointed out that David did not sleep with her, but she was his constant caregiver.  When Bathsheba told Solomon of Adonijah’s request, we read, “And king Solomon answered and said unto his mother, And why dost thou ask Abishag the Shunammite for Adonijah? ASK FOR HIM THE KINGDOM ALSO; for he is mine elder brother; even for him, and for Abiathar the priest, and for Joab the son of Zeruiah.” (1 Kings 2:22).  Solomon recognized Adonijah’s trickery and knew he was plotting to take his kingdom.  To ask for Abishag was to ask for the kingdom. (Read 2 Samuel 12:8 as an example.) 

Solomon, in order to preserve his kingdom from his brother’s devious plan, had him killed (1 Kings 2:24).  Solomon deals with Abiathar next. His life is spared but Solomon forced him out of the priesthood. (1 Kings 2:26-27).  He then went on to have Joab killed for his treachery. (1 Kings 2:28-31).

Besides the accuracy of these events, we have a foreshadow of the government in the Millennial Kingdom of the Lord. In the present age grace reigns through righteousness.  In the Kingdom Age, when the Lord rules over all, righteousness reigns and all disobedience will be swiftly met with judgment.  (CC)  (740.2)