v1-5: The declaration, often repeated, to live God's way, in the midst of peoples who did not.
v2: "I am the Lord your God"; therefore our lives must be ordered by His will, and not be the standards of others.
v3: The key principle is repeated, that the people of God were not to follow the ways of the Egyptians, nor the Canaanites. We are not to be like unbelievers. In v24, the other nations were defiled by their unholy ways.
v4: In contrast, the Israelites had to follow the laws of the Lord.
v5: Ex 24.7; the Israelite had committed himself to obey the law; and here was life for him.
v6-23: The application of the principles of v1-5 to sexual relations. In all respects, where God has drawn the line, we are not to transgress.
v6-18: Sexual intimacy between close relations was forbidden. The practice in earlier years, where, for example, Abraham married his half-sister (Gen 20.12), was no longer allowed.
v19-23: These verses seem to relate to sexual sins characteristic of the Canaanites.
v24: The Canaanites practised "all" these things. The prohibitions were therefore not theoretical; they were both practical and relevant, because people did do them. The Israelites were forbidden from doing "any" of them (v29).
v25: The sins of the nations resulted in national punishments; the land vomited up its inhabitants. The Lord God said that this would happen again, if Israel continued in the sins of the Canaanites (v28).
v26: Those who belong to God were characterised by a quite different way of life.
v29: Sins practised by individuals would result in personal punishment; as in Deut 19.19. The nation had the responsibility to exact the required punishment.
v30: And the chapter ends where it started, "I am the Lord your God." This is the final and ultimate motivation to godly living. Dr Alfred Edersheim comments; 'On every side there was evidence that religion here was not merely a creed, nor a set of observances, but that it pervaded every relationship, and dominated every phase of life.' (Sketches of Jewish Social Life).