2 Kings 17:15

And they rejected his statutes, and his covenant that he made with their fathers, and his testimonies which he testified against them; and they followed vanity, and became vain, and went after the heathen that were round about them, concerning whom the LORD had charged them, that they should not do like them.

The verse belongs to the Assyrian capture of Samaria and the scattering of the shattered remnant of the ten tribes among the nations in the earlier part of Hezekiah's reign. That Assyrian success led many to question the power of the God of the Hebrews and emboldened Nineveh, which had set aside the message of Jonah, in defiance against Heaven. A few years after the fall of Samaria the same victorious armies reappeared in Palestine against the fenced cities of Judah with some measure of success but withdrew for a season because of difficulties in other parts of their realm, leaving the question whether the gods of the heathen would finally prevail to be demonstrated before the nations of the world only toward the close of Hezekiah's reign.

It means that Israel rejected God's statutes and law, His covenant made with their fathers, and His testimonies, and followed worthless idols and empty practices and went after the surrounding nations despite God's charge not to do like them. Israel's downfall began when the people rejected God's ways in favor of human and heathen ways. Solomon's alliances with heathen nations helped spread their principles and practices, including idolatry, polygamy, human sacrifice, and licentious rites.

Their kings' pride and rebellion led them away from God despite His repeated calls to repent through the prophets, and their refusal to repent continued the apostasy. Their apostasy continued until they became prey to the nations whose practices they had chosen to follow. This rejection was covenant disobedience and sin that brought affliction and led to Israel's removal from its land and exile to Assyria, where enemies plundered the land and carried the people into captivity.