The book of Leviticus, in its catalogue of forbidden unions, says nothing about marriage between uncles and nieces. The rabbis of the talmudic period allowed and even approved of such marriages, at least between a man and his sister’s daughter; they seem to have differed on the question of marriage between a man and his brother’s daughter, while agreeing that it was not forbidden by the Bible. Later, a small number of medieval rabbis moved to prohibit any uncle-niece marriage at all, and recent scholars have discovered ancient manuscript evidence that both Sadducees and the Qumran sect forbade such unions. Rudolph Klein explains:
[The 20th-century rabbi and academic scholar] Saul Lieberman argues that the talmudic rabbis classified marrying one’s niece as a positive deed specifically in order to counter the Sadducean view that marrying one’s niece is biblically forbidden. He notes it is the rabbis’ way to take things that are simply “allowed” by the Bible and encourage people to do them in order to undermine sectarian heretical views.
Interestingly, [the 14th-century rabbinic scholar] Ishtori ha-Parḥi notes that the Sadducees were not innovators in banning marriage to a niece; [he claims that] they adopted the prohibition from the Samaritans, who took the idea from the Arabs. Later, the Karaites also followed suit and outlawed uncle-niece marriage.
Read more on Seforim: http://seforim.blogspot.com/2015/10/avunculate-marriage-in-bible.html