What did Hashem order Moshe to record?
Rashi: That Amalek was the first of all the nations to attack Yisrael.
Ramban and Seforno: To insert in the Torah Parshas Zachor (in Ki Seitzei - Devarim 25:17-19). 1
Targum Yonasan: He ordered Moshe to record the battle with Amalek in the Book of Chronicles, in which the battles that were fought were recorded. 2
What is the significance of the long-winded phrase, "Kesov Zos Zikaron ba'Sefer"?
Megilah 7a: In response to Esther's request to insert her Sefer in Kesuvim, the Chachamim Darshened "Kesov Zos"- refers to what is written here and in Ki Seitzei; "Zikaron" - to what is written in Nevi'im - when Sha'ul fought Amalek, and "ba'Sefer" - refers to Megilas Esther. With this Derashah, they permitted Megilas Esther to be included in Kesuvim. 1
See Torah Temimah, note 13, who elaborates. Megilah 30b - This Parsha is read as the Keri'as ha'Torah on Purim, prior to the reading of the Megilah.
What did Hashem instruct him to pass on into the ears of Yehoshua?
Rashi: He told him to instruct Yehoshua to command Yisrael to pay Amalek his dessert for being the first to attack Yisrael.
Rashbam: That he should fulfill the Mitzvah of destroying Amalek.
Vilna Gaon: He taught Yehoshua that the word "Zeicher" should be read accordingly. 3
To encourage them to take revenge.
Ramban: Since he was a firsthand witness.
And not "Zechar" (meaning the males of Amalek - to avoid the mistake of Yo'av (David ha'Melech's general), who misread the word and ended up leaving alive the Edomi women. Maharsha (to Bava Basra 21a) - Yo'av thought that if even for a war of Mitzvah (Amalek), we kill only males, all the more so an optional war (Edom)!
Why did Hashem instruct Moshe to tell it specifically to the ears of Yehoshua?
Rashi: Because Yehoshua was destined to lead Yisrael into Eretz Cana'an. 1
Rashi: A hint that it would be Yehoshua, and not he, who would be granted that privilege.
What did Hashem mean when He said that He would destroy the memory of Amalek?
Seforno: He meant that He would destroy even his animals. 1
As Shmuel ordered King Shaul to do (see Shmuel I 15:3). See also Ba'al ha'Turim.
What are the implications of "Machoh Emcheh ... ", which implies that Hashem Himself will wipe out Amalek? (In Parshas Zachor (Devarim 25:19), it is Yisrael who is commanded to do so - "Timcheh Es Zeicher Amalek"!)
Rashbam: It implies that it is Hashem's will that Amalek's name be erased.
Rosh: It implies that Hashem Himself will erase Amalek's name, because he (Amalek) stretched out his hand to destroy the Beis-ha'Mikdash. 1
Prior to that event, it was incumbent upon us to do so.
What is the meaning of "mi'Tachas ha'Shamayim"?
Sifrei: It means that nothing will remain of Amalek - no child or offspring, no camel or donkey; so that nobody will be able to (point a finger and) say, 'This belongs to Amalek.'
Why does the Torah use the expression "Mechiyah" - "wiping out," in connection with Amalek (in this Pasuk, as well as in Devarim 25:19)?
Maharal (Ohr Chadash p. 187, to Esther 6:12): The expression 'Mechiyah' implies complete destruction of their 'Tzelem.' 1 (For the meaning of 'Tzelem Elokim' according to Maharal, refer to Bereishis 1:27:2.1 .)
Maharal, in context, is explaining why Haman was hanged on a tall gallows. Beis Din is prohibited to allow the corpse of the executed to remain on the tree overnight, "since a hanging one is a blasphemy of G-d" (Devarim 21:23); from this we learn that hanging destroys the G-dly image in which a person was created. (Regarding Amalek, on the other hand, we are commanded to do just that.) Compare to Maharal (Chidushei Agados Vol. 2, p. 107, to Gitin 56b) - the Torah also uses the term 'Mechiyah' regarding the Dor ha'Mabul (Bereishis 6:7); they were "wiped out" by water, erasing their Tzurah, the essence of their creation.
QUESTIONS ON RASHI
Rashi writes: "'Write this as a remembrance in a book' - [I.e.,], that Amalek came to match up against Yisrael, before any other nation." Why does that make what he did worse?
Gur Aryeh: Other nations would learn from what Amalek did, and do the same. See Rashi's comments to Devarim 25:18, DH "Asher Karecha 1 ba'Derech."
Lit. - "who cooled you off." Chazal illustrate what Amalek did, with a parable to a boiling bath, into which one fool jumped in and got scalded - even while cooling it off for everyone else.
Rashi writes: "And [instruct] Yehoshua - who will bring Bnei Yisrael into the Land... Here, it was hinted to Moshe that it would be Yehoshua who would bring Yisrael into the Land," i.e., and not Moshe himself. How can this be reconciled with Bamidbar 10:12, which implies that only when Moshe hit the rock at Mei Merivah, was it decreed that he would not enter the Land?
Gur Aryeh (to Bamidbar 20:12): There are three stages to Hashem's decree. a. Before the verdict, the decree is contemplated (and at that stage it can still be averted, even without many Tefilos and merits); 1 b. Hashem pronounces the verdict (but it can yet be cancelled though numerous prayers and merits); c. Hashem swears to fulfill the decree (and then, prayer and outcries will no longer be effective). 2 At this point, Hashem had not yet said outright that Moshe would not enter the Land (that took place only later, at Mei Merivah). But since the decree did already exist in thought, Hashem alluded to it when instructing Moshe.