Haman built a gallows fifty cubits high to execute Mordecai. His wife Zeresh and his friends suggested it, and Haman had it made before going to ask the king for Mordecai's death (Esther 5:14).
The gallows comes from wounded pride. Haman has wealth, status, children, promotion, and special access to Esther's banquet, but he says all of it means nothing to him while Mordecai sits at the king's gate and refuses to honor him (Esther 5:11-13).
The next chapter turns the plan upside down. The king cannot sleep, the royal records are read, Mordecai's earlier loyalty is remembered, and Haman is forced to honor the very man he intended to kill (Esther 6:1-11). Later, Haman is hanged on the gallows he had prepared for Mordecai (Esther 7:9-10).
This is not just a strange execution detail. In Esther, the gallows becomes part of the book's reversal pattern: the device of destruction becomes the instrument by which the destroyer is judged.
The story exposes the instability of pride and the hidden providence running through Esther. Human schemes can look powerful for a moment, but the narrative shows them being overturned in ways the characters did not control.
13Yet all this avails me nothing, so long as I see Mordecai the Jew sitting at the king`s gate.
14Then said Zeresh his wife and all his friends to him, Let a gallows be made fifty cubits high, and in the morning speak you to the king that Mordecai may be hanged thereon: then go you in merrily with the king to the banquet. The thing pleased Haman; and he caused the gallows to be made.