Deuteronomy 29:21

And the LORD shall separate him unto evil out of all the tribes of Israel, according to all the curses of the covenant that are written in this book of the law:

Deuteronomy 29:21 stands in the section of Deuteronomy that renews the covenant with Israel. It belongs to the solemn warnings in Deuteronomy 27-28 about the curses that would follow disobedience, and the surrounding prophecy describes calamities that came upon the Jews because of their disobedience. The separation unto evil means the offender is singled out from all the tribes of Israel for the consequences of the covenant curses written in the law. The book of the law holding those curses is the law recorded by Moses, distinct from the law written by God on stone tablets.

The punishment is for breaking the covenant made in the land of Moab, which is the ceremonial law of Moses, the book of the covenant and book of the law, separate and distinct from the covenant made in Horeb, which is the Ten Commandments. That book was written by Moses, delivered to the priests and elders, and placed at the side of the ark of the covenant as a witness against Israel. It was ordered to be read by the priests before all Israel once in seven years at the feast of tabernacles, unlike the moral law which the people were to teach diligently to their children daily.

The book of the law is the secondary, theocratic law of the Jews, which is temporary and becomes obsolete when the object for which it was instituted is secured and the circumstances in view of which it was enacted cease to exist. It contains two kinds of commandments: one kind exists in primary law or sustains an inseparable relation to it and is therefore binding under all circumstances. The other kind is founded only on the circumstances of the Jews as a nation and their connection with the earthly sanctuary, comprising the sanctuary services with feasts, new moons, and ceremonial sabbaths, and is no longer obligatory when those circumstances cease.

The chapter connects these curses with the desolation of the land and its cities as their visible result. The separation unto evil according to all the curses shows that the days of vengeance upon Israel were written of old, foretelling divine vengeance for neglected opportunities, unperformed duties, and final rejection of Christ, fulfilled in the desolation of Jerusalem. The covenant curses would fall on Israel for rebellion against God, so the calamities of the people, including their captivity, were the consequence God had warned of and not a failure of his faithfulness.