Mordecai was the hero in the Book of Esther. He was a resident of Susa (Shushan), the Persian capitol during the reign of Ahasuerus (Xerxes 1). When Mordecai's uncle, Abihail, died (Esther 2:5), Mordecai took his orphaned cousin, Esther, into his home as her adoptive father. After Esther became Ahasuerus' queen, Mordecai discovered a plot to assassinate King Ahasuerus, and exposed it, saving the king's life (Est. 2:21-22).
Mordecai, a Jew, would not condone idolatry, and showed his loyalty to God by not bowing to Haman, the official who was second-in-command to the king. Haman hated Mordecai and plotted to kill all the Jews in Persia. Mordecai encouraged his cousin, Queen Esther, to go to the king and save her people. She did so and the plot turned against Haman, who ironically was hanged on the same gallows he had prepared for Mordecai.
Haman was succeeded by Mordecai, who now was second-in-command to the king. He encouraged his people to defend themselves against the scheduled massacre planned by Haman. Persian officials also assisted in protecting the Jews, an event celebrated by the annual Feast of Purim (Esther 9:26-32)