Negative commandment · Lo Ta’aseh #59 of 613
Not to forget the wicked deeds which Amalek perpetrated against us
שלא יסור מליבנו מעשה עמלק הרע שעשה לנו
The verse · Devarim 25:19
וְהָיָה בְּהָנִיחַ ה׳ אֱלֹהֶיךָ לְךָ מִכׇּל־אֹיְבֶיךָ מִסָּבִיב בָּאָרֶץ אֲשֶׁר ה׳אֱלֹהֶיךָ נֹתֵן לְךָ נַחֲלָה לְרִשְׁתָּהּ תִּמְחֶה אֶת־זֵכֶר עֲמָלֵק מִתַּחַת הַשָּׁמָיִם לֹא תִּשְׁכָּח
“Therefore it shall be, when the Lord thy God has given thee rest from all thy enemies round about, in the land which the Lord thy God gives thee for an inheritance to possess it, that thou shalt blot out the remembrance of ῾Amaleq from under heaven; thou shalt not forget.”
The Rambam’s words
Not to forget the wicked deeds which Amalek perpetrated against us, as [Deuteronomy 25:19] states: "Do not forget."
שלא יסור מליבנו מעשה עמלק הרע שעשה לנו, שנאמר "לא, תשכח" (דברים כה,יט).
Why · Sefer HaChinuch #605
To not forget what he did to us
“It is from the roots of this commandment [that it is] to put into our hearts that anyone who distresses Israel is despised in front of G-d, blessed be He; and that according to his evil and his great deceptive damage, will be his downfall and bad [occurrences], as you find with Amalek: That due to [the fact that] he committed a great evil to Israel — that he began to harm them — blessed be He, commanded us to “destroy his memory from the earth” and root it out after him, until its end. (See Sefer HaMitzvot, Positive Commandments 189.)”
Where in the Mishneh Torah
Hilchot Kings and Wars הלכות מלכים ומלחמות