The relationships that God forbade in the Old Testament Law are listed in Leviticus chapter 18, verses 6–18. In that passage, the Israelites are commanded not to commit incest, which is a defiling sin (Leviticus 18:24). The law lists relationships, whether involving marriage or not, that God defined as incestuous. An Israelite man was not to marry or have sex with the following people:
His sibling, half-sibling, or stepsibling
His sister-in-law, as long as his wife was living (Leviticus 18:18)
Interestingly, marriage between cousins is nowhere forbidden in the Bible. The other relationships listed above are immoral.
Before the law was given, in the early days of humanity, there was a need for marriage between close relatives, as there were a limited number of human beings. Adam and Eve’s children married their siblings, by necessity. Even in those days, however, marriage between parent and child was not allowable, as Genesis 2:24 implies: “That is why a man leaves his father and mother and is united to his wife, and they become one flesh.” A man was to leave his mother, not marry her.
It was not until humanity increased greatly on the earth that people no longer needed to intermarry among relatives. In the early days of humanity, the human genetic code was not corrupted to the extent that it is today. Therefore, marriages between close relatives carried little risk of genetic abnormalities in the children they produced. Once the human race expanded and, due to sin, the human genetic code grew more corrupt, God commanded against the marriage of close relatives.
There is nothing essentially wrong with marrying a first cousin or other, more distant relative. There are other considerations, though. One is the civil law in the place where we live: many places disallow marriage between first cousins, and the Bible commands us to obey the laws of the nation we live in (Romans 13:1–6).
While Christians are no longer under the Law of Moses, the moral principles still stand. That means that the relationships listed in Leviticus 18 are still immoral. No one should marry a sibling or a parent. The only moral exception to the list is that of marriage to an in-law after the death of a spouse.