It is explained in Sefer Kehillat Yaacov Erech Heh"Mem:2 and 8 discussing Haman by Rabbi Yaacov Tzvi Yolles, that many of the central characters in the story of Purim are reincarnations of the players in the exodus from Egypt.
Haman is a descendent from Amalek (עמלק), the fruit of Amalek. Amalek is from the spiritual root of the Nachash found in Bereshit. This is based upon the prophecy of Isaiah 14:29 which says:
אל־תשמחי פלשת כלך כי נשבר שבט מכך כי־משרש נחש יצא צפע ופריו שרף מעופף
That צפע is gematria Amalek. And on the side of holiness, Mordechai is the gilgul of Moshe Rabbeinu. Rabbi Yolles points out that the Roshei Teivot of Haman (המן) is המן משורש נחש, that Haman, like his ancestor Amalek, is from the root of the Nachash.
It’s interesting to note from his full name in Megillat Esther (המן בן המדתא האגגי) that the Mispar Katan with the 4 words of his name (a sum of 56) equals the Mispar Katan of שרף מעופף when including the 8 letters and 2 words. That complies with both details in the posuk from Isaiah, that Amalek is from the root of the Nachash and Haman is (Amalek’s fruit) his descendent.
And all this concept that Purim is in memory of the Exodus from Egypt follows the idea presented in Shavuot 39a that Purim is when the Jewish people fulfilled that which they accepted at the giving of the Torah. Like it says:
ואין לי אלא מצוה שקיבלו עליהם מהר סיני מצות העתידות להתחדש כגון מקרא מגילה מנין ת"ל (אסתר ט, כז) קימו וקבלו קיימו מה שקבלו