So the king and Haman went to Queen Esther's banquet.
And while they were drinking wine that day, the king again asked her, "Tell me what you want, Queen Esther. What is your request? I will give it to you, even if it is half the kingdom!"
And so Queen Esther replied, "If Your Majesty is pleased with me and wants to grant my request, my petition is that my life and the lives of my people will be spared.
For my people and I have been sold to those who would kill, slaughter, and annihilate us. If we had only been sold as slaves, I could remain quiet, for that would have been a matter too trivial to warrant disturbing the king."
"Who would do such a thing?" King Xerxes demanded. "Who would dare touch you?"
Esther replied, "This wicked Haman is our enemy." Haman grew pale with fright before the king and queen.
Then the king jumped to his feet in a rage and went out into the palace garden. But Haman stayed behind to plead for his life with Queen Esther, for he knew that he was doomed.
In despair he fell on the couch where Queen Esther was reclining, just as the king returned from the palace garden. "Will he even assault the queen right here in the palace, before my very eyes?" the king roared. And as soon as the king spoke, his attendants covered Haman's face, signaling his doom.
Then Harbona, one of the king's eunuchs, said, "Haman has set up a gallows that stands seventy-five feet tall in his own courtyard. He intended to use it to hang Mordecai, the man who saved the king from assassination." "Then hang Haman on it!" the king ordered.
References for Esther 7:9
So they hanged Haman on the gallows he had set up for Mordecai, and the king's anger was pacified.