King Solomon loved 700 foreign wives and 300 concubines forbidden by Israel to associate with. They turned Solomon's heart away after their gods so he was not wholly devoted to the Lord his God. He went after Ashtoreth the goddess of the Sidoninans, Milcom of the Ammonites and built a high place for Chemosh the idol of Moah and for Molech of Ammon (1 Kings 11:1-8). Fleshly lust and worldly prestige turn your heart away from God.
The Lord was angry because after appearing to him twice, Solomon turned his heart away from God. He commanded him to not go after after gods to disobey God. He told Solomon that he would tear his kingdom and give it to his servant during the reign of his son for the sake David and Jerusalem (1 Kings 11:9-13). Spiritual experiences don't prevent your heart turning away from God.
The Lord raised up Hadad the Edomite as an adversary to Solomon. He escaped to Egypt when Joab, David's army commander, killed every male in Edom. God also raised up Rezon and gathered men to himself after David killed others in Zodak. He abhorred Israel and reigned over Aram (1 Kings 11:14-25). Outside enemies come against you when your heart turns away from God to make life more complicated.
Jeroboam, an Ephraimite of Zeredah, rebelled against Solomon because he built the Millo and closed up the breach in Jerusalem. Jeroboam was an industrious, valiant warrior over the the forced labor of the house of Joseph. The prophet Ahijah met him and tore his cloak in 12 pieces. He gave Jeroboam ten pieces predicting he would rule ten tribes and Solomon's son would rule one tribe because of his father's disobedience. Ahijah told Jeroboam that God would build an enduring house like David's if he observed His commandments. When Solomon tried to kill Jeroboam, he fled to Egypt until Solomon died and Rehoboam became king (1 Kings 11:26-43). Inside enemies come when your heart turns away from God so you can't embrace God's promises.
What if Solomon followed his advice in Prov. 3:1-10? Will you follow it?