Mordecai resided in Susa (Shushan or Shoushan), the metropolis of Persia. He adopted his orphaned cousin (Esther 2:7), Hadassah (Esther), whom he brought up as if she were his own daughter. When “young virgins” were sought, she was taken into the presence of King Ahasuerus and was made queen in the place of the exiled queen Vashti. Subsequently, Mordecai discovered a plot of the king’s chamberlains Bigthan and Teresh to assassinate the king. Because of Mordecai’s vigilance, the plot was foiled.
Haman the Agagite had been raised to the highest position at court. In spite of the king’s decree that all should prostrate themselves before Haman, Mordecai refused to do so. Haman, stung by Mordecai’s refusal, resolved to kill not only Mordecai but all Jewish exiles throughout the Persian empire, and won the king’s permission to carry out his plan.
Mordecai communicated Haman’s scheme to Queen Esther, who used her favor with the king to reverse the scheme, leading the king to authorize Jews to kill their enemies, which they did.
During all this, the king had happened to remember Mordecai’s service in foiling the assassination plot and had asked Haman how a person who did a great service to the king should be honored.
Haman answered, thinking the question was about him; and the king followed this advice, honored Mordecai, and eventually made Mordecai his chief advisor. Haman was executed on gallows that he had set for Mordecai. The feast of Purim celebrates these reversals.