ln light of the above, it will be understood why Moshe Rabbeinu, peace be upon him, commanded in the Book of Deuteronomy (—not in the earlier books of the Torah addressed to the generation of Jews who wandered in the desert,17 but) to the generation that entered the Holy Land that they (too and not only the subsequent generations) recite the Shema twice daily, the intention in the Shema being to acknowledge the Kingdom of Heaven with self-sacrifice; i.e., the Shema teaches us to accept martyrdom for the sanctification of G-d’s Name.
וּבָזֶה יוּבַן, לָמָּה צִוָּה מֹשֶׁה רַבֵּינוּ עָלָיו הַשָּׁלוֹם, בְּמִשְׁנֵה תוֹרָה, לַדּוֹר שֶׁנִּכְנְסוּ לָאָרֶץ, לִקְרוֹת קְרִיאַת שְׁמַע פַּעֲמַיִם בְּכָל יוֹם, לְקַבֵּל עָלָיו מַלְכוּת שָׁמַיִם בִּמְסִירַת נֶפֶשׁ,
Now one may ask: Why was it necessary for our forefathers to prepare themselves for martyrdom? Had they not been promised that “G-d will lay the fear and dread of you [upon all the inhabitants of the land]”?18
וַהֲלֹא הִבְטִיחַ לָהֶם: "פַּחְדְּכֶם וּמוֹרַאֲכֶם יִתֵּן ה' וְגוֹ'";
They had no reason to fear that anyone would attempt to force them to deny the Kingdom of Heaven, necessitating self-sacrifice to resist such efforts. In this sense, they were as well protected as the Jews who traveled the desert with Moses (who were not commanded to recite the Shema).19 We must therefore conclude that preparation for martyrdom is necessary not only to ensure that it will be put into practice if and when necessary,
but because the fulfillment of the Torah and its commandments is contingent on one’s being constantly aware of his readiness to surrender his life to G-d for the sake of His unity, i.e., that a person remember that he would be willing to sacrifice his life for the sake of G-d’s unity if the situation would warrant it—which is the message contained in the Shema; he must therefore recite it twice daily, morning and evening, so that this awareness will be fixed permanently in his heart and will not depart from his memory night and day.
אֶלָּא, מִשּׁוּם שֶׁקִּיּוּם הַתּוֹרָה וּמִצְוֹתֶיהָ, תָּלוּי בָּזֶה שֶׁיִּזְכּוֹר תָּמִיד עִנְיַן מְסִירַת נַפְשׁוֹ לַה' עַל יִחוּדוֹ, שֶׁיִּהְיֶה קָבוּעַ בְּלִבּוֹ תָּמִיד מַמָּשׁ, יוֹמָם וָלַיְלָה לֹא יָמִישׁ מִזִּכְרוֹנוֹ,
In this way, one is able to withstand his evil inclination and to vanquish it at every time and every moment, even after Moses’ passing, whenever Jews are engaged in an intense struggle with the evil inclination, as it is written:20 “G-d said to Moses, ‘Behold, you are about to sleep with your fathers, and this people will rise up and stray…,’”18
כִּי, בָּזֶה יוּכַל לַעֲמוֹד נֶגֶד יִצְרוֹ לְנַצְּחוֹ תָּמִיד בְּכָל עֵת וּבְכָל שָׁעָה, –
as explained above—that when one remembers that he would be prepared to suffer martyrdom for his love of G-d and his belief in G-d’s unity, he will surely be able to overcome his evil inclination and perform all the mitzvot.
כַּנִּזְכָּר לְעֵיל:

At any rate, we see that the union of the soul with G-d that is effected through the mitzvot is eternal. When one considers that he would gladly give up his life so as not to be (even momentarily) parted from G-d by practicing idolatry, he will realize that he surely ought to exert himself in performing the mitzvot which bind him to G-d forever.
The Alter Rebbe has thus demonstrated how being aware of one’s willingness to sacrifice his life for G-d affects both the areas of “turning away from evil” and “doing good,” i.e., the observance of the negative and positive commandments, respectively. It follows that this awareness should constantly be on one’s mind so that he will always be ready to apply it to his performance of the mitzvot.