Check out the recently posted article by Rabbi Klein: “Avunculate Marriage In the Bible” for a surprising answer:
The Talmud (TB Megillah 13a) relates that Mordecai not only raised the orphaned Esther, but he also married her. Furthermore, some sources, including Josephus in Antiquities (Book XI, Ch. 6), Targum Rishon (to Est. 7:6),[9] and the Vulgate (Est. 2:7) explain that Esther was Mordecai’s niece. Ibn Ezra (to Est. 8:1) and Maimonides (there)[10] also repeat that claim. Together, these two ideas indicate that Mordecai married his niece. Nonetheless, this understanding is simply mistaken as the Bible quite explicitly states that she was his first cousin, not his niece: And he brought up Hadassah, that is, Esther, his uncle’s daughter… (Est. 2:7) and Now when the turn of Esther, the daughter of Abihail the uncle of Mordecai… (Est. 2:15).
[9] Although, see Targum Rishon earlier (to Esther 2:7 and 2:15) who explicitly writes that Esther was the daughter of Mordecai’s uncle, making them first-cousins, not niece and uncle.
[10] Y. Rivlin (ed.), Pirush Megillat Esther L’Rambam (Jerusalem, 1952) pg. 60.