1 Kings 2:43

Why then hast thou not kept the oath of the LORD, and the commandment that I have charged thee with?

The verse belongs to the account in 1 Kings 2:1-46 of Solomon carrying out after David's death the charge his father gave him concerning the security of the throne. That account records how Solomon's throne came peaceably and was then secured. The securing involved general rejoicing at Solomon's anointing and the dispersal in fear of Adonijah's adherents. Adonijah himself fled to the horns of the altar and was pardoned for the time, but later for a further offence and insult to the king he was put to death, Joab was also put to death, and Abiathar the priest was retired from his office. Adonijah and Joab were slain a little after Solomon was crowned king. Solomon reigned conjointly with David about six months, taking the throne when about twenty years of age, and David reigned forty years.

The verse stands at the close of a clear, wholly narrative record running from 2 Samuel 8 through 1 Kings 2 of the continuing war between Israel and Judah. In that war the friends of Saul wanted to keep a son of the dead king on the throne after the manner of the nations around them, but God showed that He Himself selects the rulers of His people. After years of war between Saul's son and David, David triumphs and becomes the beloved king over all the tribes of Israel. 1 Kings 2 is included in the account of David's later history, which shows the fulfillment of Nathan's prophetic denunciation through the judgments that came upon David.

In the verse Solomon confronts and holds Shimei accountable for not keeping the oath of the LORD and the commandment Solomon had charged him with. The Lord's oath and the king's charge were binding obligations. The oath was an oath of allegiance sworn by the Lord, required and administered by a ruler, and the command was to remain in Jerusalem. Shimei himself had agreed that the restriction was good. Shimei was the man who had cursed and insulted David when he assumed David was going down. His life was spared only under conditions of life, yet he later left Jerusalem to retrieve his servants. This breach over what is called a slight matter exposed his disregard for his solemn oath and brought the stated penalty upon him. He was put to death for failing to abide by the conditions, so that Shimei himself ultimately went down.