1 Kings 2:36-46
"36 Then the king sent and summoned Shimei and said to him, “Build yourself a house in Jerusalem and dwell there, and do not go out from there to any place whatever. 37 For on the day you go out and cross the brook Kidron, know for certain that you shall die. Your blood shall be on your own head.”38 And Shimei said to the king, “What you say is good; as my lord the king has said, so will your servant do.” So Shimei lived in Jerusalem many days.
39 But it happened at the end of three years that two of Shimei's servants ran away to Achish, son of Maacah, king of Gath. And when it was told Shimei, “Behold, your servants are in Gath,” 40 Shimei arose and saddled a donkey and went to Gath to Achish to seek his servants. Shimei went and brought his servants from Gath. 41 And when Solomon was told that Shimei had gone from Jerusalem to Gath and returned, 42 the king sent and summoned Shimei and said to him, “Did I not make you swear by the Lordand solemnly warn you, saying, ‘Know for certain that on the day you go out and go to any place whatever, you shall die’? And you said to me, ‘What you say is good; I will obey.’ 43 Why then have you not kept your oath to the Lordand the commandment with which I commanded you?” 44 The king also said to Shimei, “You know in your own heart all the harm that you did to David my father. So the Lord will bring back your harm on your own head. 45 But King Solomon shall be blessed, and the throne of David shall be established before the Lord forever.” 46 Then the king commanded Benaiah the son of Jehoiada, and he went out and struck him down, and he died.
So the kingdom was established in the hand of Solomon."
It has been suggested that Solomon laid a snare for Shimei in the conditions imposed upon him (36, 37), and that the latter's visit to Gath, innocent as it seems to have been, was made a pretext for finally disposing of him. But if Solomon had been so intent on disposing of him, why should he not have had him executed immediately, in accordance with his father's dying wish? (2:9) The plain reading of the passage surely indicates that Solomon showed this evil man clemency beyond his deserts, and he might have lived long enough in safety in Jerusalem had he been careful enough to observe the conditions of freedom. We think that the writer has a more profound lesson to teach here. It is that the justice of God inevitably overtakes the wicked and it is He Who ordains their doom. The straight line of His purposes weaves its way unerringly through all manner of complicated circumstances until it reaches its desired end. The mills of God grind slowly, as the poet says, but they grind exceedingly small, and the merest incident often proves, in His hands, momentous in the fulfilment of His will. No man can hope to escape from God - it is this solemn lesson that we are meant to glean from the story of Shimei's end.