According to Rashi, the king said the statement in this verse. Otherwise, as the Talmud (Megilla 16b) notes, the verse would have used the female amra (“she said”) in place of the male amar (“he said”). This is because Esther came before Achashverosh to convince him to redirect Haman’s decree against him.
The M’nos HaLevi, however, writes that the inspired idea is the “speaker” in the verse, saying that it had come from above and below.
Targum Sheini here has Achashverosh quoting the verse (Shemos 17:14) that he will “surely erase the memory of Amalek from under the Heavens.”
The Ginzei HaMelech explains Achashverosh began to fear H-Shem, as the Talmud (Megilla 13b) says he had done before. It was Haman who had convinced him to act otherwise in the past.