Leviticus 18:24

24 Do not make yourselves unclean by any of these acts, for that is how the pagans made themselves unclean, those pagans who lived in the land before you and whom the Lord is driving out so that you can go in.

Leviticus 18:24 Meaning and Commentary

Leviticus 18:24

Defile not ye yourselves in any of these things
In incestuous copulations and marriages, in adultery, corporeal and spiritual, and bestiality: for in all these the nations are defiled which I cast out before you;
that is, the seven nations of the land of Canaan, which God was about to eject out of their land to make room for the Israelites, and that on account of the above shocking vices which abounded among them; so that in some sense the land they dwelt upon was defiled by them, and called for vengeance on them, as even loathing its inhabitants, as afterwards suggested.

Leviticus 18:24 In-Context

22 No man is to have sexual relations with another man; God hates that.
23 No man or woman is to have sexual relations with an animal; that perversion makes you ritually unclean.
24 Do not make yourselves unclean by any of these acts, for that is how the pagans made themselves unclean, those pagans who lived in the land before you and whom the Lord is driving out so that you can go in.
25 Their actions made the land unclean, and so the Lord is punishing the land and making it reject the people who lived there.
26 They did all these disgusting things and made the land unclean, but you must not do them. All of you, whether Israelites or foreigners living with you, must keep the Lord's laws and commands,
Scripture taken from the Good News Translation - Second Edition, Copyright 1992 by American Bible Society. Used by Permission.