2 Chronicles 16:4

And Ben-hadad hearkened unto king Asa, and sent the captains of his armies against the cities of Israel; and they smote Ijon, and Dan, and Abel-maim, and all the store cities of Naphtali.

Asa brought out silver and gold from the treasures of the house of the Lord and from the treasures of the king's house to hire Ben-hadad king of Syria to break his league with Baasha king of Israel. Ben-hadad hearkened unto Asa and answered his request by sending the captains of his armies against the cities of Israel, and they smote Ijon and Dan and Abel-maim and all the store cities of Naphtali.

This was done in the crisis when the king of Israel had seized Ramah, when Baasha was building Ramah to block Judah. Because of that Syrian attack upon the northern cities, Baasha left off building Ramah and let his work cease.

The verse means that Asa sought deliverance through an alliance with Syria, following his own judgment contrary to the will of God, relying on the king of Syria instead of trusting and relying on the Lord God alone when in danger, and thus turning from Him. For this reliance on Syria rather than on the Lord, Asa was rebuked by the prophet. Such turning from God is no light matter, for the Lord will trouble whatever man so turns from Him, whatever his former calling, and will deal with him according to his works, so that from that time on there shall be wars.