For the sake of ease I will quote from the translation of the book of Esther chapter 3 at https://www.mechon-mamre.org/p/pt/pt3303.htm
1 After these things did king Ahasuerus promote Haman the son of Hammedatha the Agagite, and advanced him, and set his seat above all the princes that were with him.
2 And all the king’s servants, that were in the king’s gate, bowed down, and prostrated themselves before Haman; for the king had so commanded concerning him. But Mordecai bowed not down, nor prostrated himself before him.
3 Then the king’s servants, that were in the king’s gate, said unto Mordecai: ‘Why transgressest thou the king’s commandment?’
4 Now it came to pass, when they spoke daily unto him, and he hearkened not unto them, that they told Haman, to see whether Mordecai’s words would stand; for he had told them that he was a Jew.
5 And when Haman saw that Mordecai bowed not down, nor prostrated himself before him, then was Haman full of wrath.
6 But it seemed contemptible in his eyes to lay hands on Mordecai alone; for they had made known to him the people of Mordecai; wherefore Haman sought to destroy all the Jews that were throughout the whole kingdom of Ahasuerus, even the people of Mordecai.
7 In the first month, which is the month Nisan, in the twelfth year of king Ahasuerus, they cast pur, that is, the lot, before Haman from day to day, and from month to month, to the twelfth month, which is the month Adar.
8 And Haman said unto king Ahasuerus: ‘There is a certain people scattered abroad and dispersed among the peoples in all the provinces of thy kingdom; and their laws are diverse from those of every people; neither keep they the king’s laws; therefore it profiteth not the king to suffer them.
9 If it please the king, let it be written that they be destroyed; and I will pay ten thousand talents of silver into the hands of those that have the charge of the king’s business, to bring it into the king’s treasuries.’
10 And the king took his ring from his hand, and gave it unto Haman the son of Hammedatha the Agagite, the Jews’ enemy.
11 And the king said unto Haman: ‘The silver is given to thee, the people also, to do with them as it seemeth good to thee.’
12 Then were the king’s scribes called in the first month, on the thirteenth day thereof, and there was written, according to all that Haman commanded, unto the king’s satraps, and to the governors that were over every province, and to the princes of every people; to every province according to the writing thereof, and to every people after their language; in the name of king Ahasuerus was it written, and it was sealed with the king’s ring.
13 And letters were sent by posts into all the king’s provinces, to destroy, to slay, and to cause to perish, all Jews, both young and old, little children and women, in one day, even upon the thirteenth day of the twelfth month, which is the month Adar, and to take the spoil of them for a prey.
14 The copy of the writing, to be given out for a decree in every province, was to be published unto all peoples, that they should be ready against that day.
15 The posts went forth in haste by the king’s commandment, and the decree was given out in Shushan the castle; and the king and Haman sat down to drink; but the city of Shushan was perplexed.
During the 7 day holiday of Passover {Pesach} G-d caused a hidden miracle to save Mordecai as explained by the Talmud, Tractate Megillah 15b 16a. Although the full military victory against the supporters of Haman was only completed 11 months later in Shushan on the 14th of Adar. For the sake of ease I will use the translation of https://www.sefaria.org.il/Megillah.15b.20?lang=en&with=all&lang2=en
The verse states: “On that night the sleep of the king was disturbed” (Esther 6:1). Rabbi Tanḥum said: The verse alludes to another king who could not sleep; the sleep of the King of the universe, the Holy One, Blessed be He, was disturbed. And the Sages say: The sleep of the higher ones, the angels, was disturbed, and the sleep of the lower ones, the Jewish people, was disturbed. Rava said: This should be understood literally: The sleep of King Ahasuerus was disturbed.
And this was the reason Ahasuerus could not sleep: A thought occurred to him and he said to himself: What is this before us that Esther has invited Haman? Perhaps they are conspiring against that man, i.e., against me, to kill him. He then said again to himself: If this is so, is there no man who loves me and would inform me of this conspiracy?
He then said again to himself: Perhaps there is some man who has done a favor for me and I have not properly rewarded him, and due to that reason people refrain from revealing to me information regarding such plots, as they see no benefit for themselves. Immediately afterward, the verse states: “And he commanded the book of remembrances of the chronicles to be brought” (Esther 6:1).
The verse states: “And they were read before the king” (Esther 6:1). The Gemara explains that this passive form: “And they were read,” teaches that they were read miraculously by themselves. It further says: “And it was found written [katuv]” (Esther 6:2). The Gemara asks: Why does the Megilla use the word katuv, which indicates that it was newly written? It should have said: A writing [ketav] was found, which would indicate that it had been written in the past. The Gemara explains: This teaches that Shimshai, the king’s scribe who hated the Jews (see Ezra 4:17), was erasing the description of Mordecai’s saving the king, and the angel Gavriel was writing it again. Therefore, it was indeed being written in the present. Rabbi Asi said: Rabbi Sheila, a man of the village of Timarta, taught: If something written down below in this world that is for the benefit of the Jewish people cannot be erased, is it not all the more so the case that something written up above in Heaven cannot be erased?
The verse states that Ahasuerus was told with regard to Mordecai: “Nothing has been done for him” (Esther 6:3). Rava said: It is not because they love Mordecai that the king’s servants said this, but rather because they hate Haman. The verse states: “Now Haman had come into the outer court of the king’s house, to speak to the king about hanging Mordecai on the gallows that he had prepared for him” (Esther 6:4). A Sage taught in a baraita: This should be understood to mean: On the gallows that he had prepared for himself.
The verse relates that Ahasuerus ordered Haman to fulfill his idea of the proper way to honor one who the king desires to glorify by parading him around on the king’s horse while wearing the royal garments: “And do so to Mordecai the Jew who sits at the king’s gate, let nothing fail of all that you have spoken” (Esther 6:10). The Gemara explains that when Ahasuerus said to Haman: “And do so to Mordecai,” Haman said to him in an attempt to evade the order: Who is Mordecai? Ahasuerus said to him: “The Jew.” Haman then said to him: There are several men named Mordecai among the Jews. Ahasuerus then said to him: I refer to the one “who sits at the king’s gate.”
Haman said to him: Why award him such a great honor? It would certainly be enough for him to receive one village [disekarta] as an estate, or one river for the levy of taxes. Ahasuerus said to him: This too you must give him. “Let nothing fail of all that you have spoken,” i.e., provide him with all that you proposed and spoke about in addition to what I had said.
The Gemara describes what occurred as Haman went to follow the king’s orders, as the verse states: “Then Haman took the apparel and the horse” (Esther 6:11). When he went, he found Mordecai as the Sages were sitting before him, and he was demonstrating to them the halakhot of the handful, i.e., the scooping out of a handful of flour from the meal-offering in order to burn it on the altar.
Once Mordecai saw him coming toward him with his horse’s reins held in his hands, he became frightened, and he said to the Sages: This evil man has come to kill me. Go away from him so that you should not get burnt from his coals, i.e., that you should not suffer harm as well. At that moment Mordecai wrapped himself in his prayer shawl and stood up to pray. Haman came over to where they were and sat down before them and waited until Mordecai finished his prayer.
In the interim, as he waited, Haman said to the other Sages: With what were you occupied? They said to him: When the Temple is standing, one who pledges a meal-offering would bring a handful of fine flour and achieve atonement with it. He said to them: Your handful of fine flour has come and cast aside my ten thousand pieces of silver, which I had pledged toward the destruction of the Jewish people.