The king , furious , storms out , and Haman asks Esther for mercy . When the king comes back in , he mistakes Haman for ` molest ` ing his Queen , and hangs him on the gallows that Haman had prepared for Mordecai . The king comes back in at this moment and thinks Haman is assaulting the queen ; this makes him angrier than before and he orders Haman hanged on the gallows that Haman had prepared for Mordechai .