Devarim25:17

זָכוֹר אֵת אֲשֶׁר־עָשָׂה לְךָ עֲמָלֵק בַּדֶּרֶךְ בְּצֵאתְכֶם מִמִּצְרָיִם׃

Remember what Amalek did to you on the way, when you came out of Egypt:

Devarim 25:17

זָכוֹר אֵת אֲשֶׁר־עָשָׂה

Devarim / Deuteronomy 25:17 · Pshat

Devarim 25:17

זָכוֹר אֵת אֲשֶׁר־עָשָׂה לְךָ עֲמָלֵק בַּדֶּרֶךְ בְּצֵאתְכֶם מִמִּצְרָיִם׃

Remember what Amalek did to you on the way, when you came out of Egypt:

Pshat פְּשָׁט

Remembering aloud

There are things you want to forget quickly. Yet the Torah commands remembering them and even telling the children. Why keep evil in memory?

Rashi links Amalek to the previous verse on false weights: cheating in measures brings an enemy. Ramban: "remember" is with the mouth, "do not forget" with the heart. Tell your children what Amalek did, as the Torah commands telling what happened to Miriam, so as to remember how dangerous evil speech is.

How Rashi and Ramban explain it

Rashi Remember what he did to you

If you cheated in measures and weights, fear the attack of an enemy. As it says: "False scales are an abomination to the Eternal" (Mishlei / Proverbs 11:1), and after it is written: "When arrogance comes, shame comes" (Mishlei / Proverbs 11:2).

Ramban Remember what Amalek did to you

I have already cited the midrash expounded in the Sifra: "Perhaps in the heart? When it says 'do not forget,' forgetting in the heart is already stated. How then do I fulfill 'remember'? That you repeat it with your mouth." And likewise in the Sifrei: "'Remember what Amalek did to you' — with the mouth, 'do not forget' — in the heart."

And I do not know what this remembering with the mouth is. If one says that the passage of Amalek is read in the congregation, then from the Torah comes the reading on the second of the special Shabbatot, "Zachor" (Megillah 29a), and this would be a basis in the Torah for the reading of the scroll of Esther.

But what seems right to me is that it means: do not forget what Amalek did to us until we blot out his name from under the heavens. And we will tell this to our children and generations: so the wicked one did to us, and that is why we were commanded to blot out his name.

So too about what happened to Miriam we were commanded to inform our children and tell the generations. And although it would have been fitting to hide it, so as not to speak in disparagement of the righteous, Scripture commanded to make it known and reveal it, so that the warning against evil speech would be on their lips. For it is a great sin, it causes much harm, and people stumble over it constantly, as they said: "and all are in the dust of evil speech" (Bava Batra 165a).

Takeaway

Before our verse stands the ban on keeping different weights and measures (Devarim / Deuteronomy 25:13–16). Rashi reads the closeness as cause and effect. So teaches Tanchuma (Ki Teitzei 8), given at the Drash level.
"Remember" and "do not forget" stand side by side in our passage (Devarim / Deuteronomy 25:17, 25:19).
"Zachor" is the Shabbat before Purim, when this passage is read in the synagogue. It is the second of the four special Shabbatot before Pesach (Megillah 29a).
Miriam spoke against her brother Moshe and was struck with a skin disease (Bamidbar / Numbers 12). The Torah commands: "Remember what the Eternal your Almighty did to Miriam on the way" (Devarim / Deuteronomy 24:9).
"All are in the dust of evil speech": the Talmud teaches that nearly everyone touches evil speech at least a little (Bava Batra 165a).