Mordecai was Esther's guardian. He either was her uncle or her cousin, depending on the Bible's version. He had raised her (with her name being "Hadassah") as the daughter he never had.
Mordecai sent Esther to the King's palace in hopes that she would be chosen as the new queen, and warned her not to reveal her Judaism.
When the king's corrupt prime minister Haman made the people bow to him, Mordecai was an exception because he wouldn't honor an Amalekite, for Amalekites wouldn't honor God.