Megillat Esther states (2:7) that after the death of Esther's parents, Mordechai took and raised Esther "as a daughter". According to the well-known midrash, Esther in fact become Mordechai's wife, not stepdaughter. I would like to examine the background and message of this midrash.
There is (at least) one other place in Tanach where the a man's wife is referred to as his daughter - the episode of David and Batsheva (Shmuel 2 12). When the prophet Natan wants to castigate King David for adulterizing with Uriyah's wife Batsheva, Natan tells a parable of a poor man who owns just "one small [female] sheep" which he dutifully and lovingly raises, so much so that "it was like a daughter to him." Then, a rich man who owns many flocks of sheep steals the poor man's single sheep and slaughters and eats it. David, hearing the story, is outraged and demands that the rich man be punished. Natan replies that David has just condemned himself. In the parable, David represented the rich man, Uriyah the poor man, and his wife Batsheva the female sheep whom the poor man considered almost a "daughter".
When the midrash says that Mordechai's "daughter" was actually his "wife", I think it is hinting to Batsheva, the other wife who was called a daughter. Further parallels between the stories are clear-cut. Mordechai would take the place of Uriyah. More importantly, King Ahashverosh would take the place of King David. Just as King David was guilty of adulterously forcing Batsheva, King Ahashverosh was guilty of forcing an intermarriage with Esther.
The interesting thing is that David and Batsheva's wrongly started relationship later became quite legitimate. After Uriyah's death, David legally took her as a wife. Their child was Shlomo, who brought Israel to its greatest power ever, who built the first Temple, and through whom the royal Davidic line was then traced. The midrash suggests that much the same thing happened between Ahashverosh and Esther. While their relationship certainly had an improper beginning, in the end it was responsible for the deliverance of the Jews from Haman's decree. What's more, this parallel may be the source of another midrash, which says that King Daryavesh (who allowed the second Temple to be built) was Ahashverosh's and Esther's son.
According to our midrash, the shared message of Esther and Batsheva is that when involved a problematic moral situation, one should not abandon hope or dissociate and avert one's eyes from the situation. Rather, one should react as did Esther and David: fast, pray, admit one's guilt, and work with all one's intensity to save the situation and reverse the decree. Thus, deadly sins and pending annihilation can be turned into national deliverance and the building of the Temple. With the proper attitude and effort, from the greatest crisis can come the most total salvation.