G-d commands the Jews to set up courts of justice in each city. The judges must not be corrupt or accept any form of bribery. G-d forbids setting up any idolatrous tree or pillar. Any animal which is blemished may not be offered as a sacrifice. A Jew who worships idols and is seen by two witnesses must be brought to trial. If he or she is found to be guilty they shall be put to death by stoning. The Jew are commanded to follow the rulings of the Sanhedrin, or when there is no Sanhedrin, the Rabbis of their time. A rebellious elder, who teaches others to go against the ruling of the Sanhedrin shall be put to death.
G-d warns that when the Jews come into the Land of Israel they will want to appoint a king over themselves. The king has stricter laws that apply to him; he may not own too many horses, or marry too many wives. He must write a Sefer Torah for himself and carry it around with him at all times.
The tribe of Levi shall not receive an inheritance of land in Israel. Instead they shall receive a portion of each sacrifice that is offered.
In the Land of Israel there will be temptations to follow after omens and divination. However these are prohibited, as are consulting with the dead, charming animals and astrology. We must be wholehearted with G-d. G-d will send other prophets to the nation, and if they are true prophets, proven through signs and not coming to add to or contradict the Torah, then we are commanded to listen to them. If they are a false prophet, speak that which they have not been commanded, or prophesy in the name of another god, they shall be put to death.
The Jews must set aside six cities of refuge. Someone who accidentally commits manslaughter must flee to one of them and remain there until the death of the current High Priest. If he leaves the confines of the city, the next of kin of the victim may kill him. Someone who commits murder wilfully and flees to one of these cities shall be tried, and either sent away or put to death, depending on the nature of the evidence of the witnesses. The testimony of a single witness shall be inadmissible. Witnesses who conspire against another to falsely accuse him or her shall receive the punishment that they intended their victim to receive.
G-d promises that He will be with the people in their battles, and therefore they should not fear their enemies. A Cohen shall be appointed to encourage the people before the battle, and to send home those who are afraid. Anyone who has just built a new house, or planted a vineyard or betrothed a woman shall also return home and not fight. Before attacking the Jews must first make overtures for peace. Only if they are refused may they lay siege to their enemies. They may not chop down fruit trees while they are besieging a city.
If a corpse is discovered and the murderer cannot be found, then the elders of the nearest city must bring an atonement. It shall be a heifer which has never been worked, they must bring it to a barren valley, and there axe its neck. They shall wash their hands over the blood of the heifer and declare that they had no knowledge of the cause of the murder.