Devarim26:16

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

This day the Eternal your Almighty commands you to do these statutes and judgements. You shall keep and do them with all your heart and with all your soul.

Devarim 26:16

הַיּוֹם הַזֶּה יְהוָה

Devarim / Deuteronomy 26:16 · Drash

Devarim 26:16

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

This day the Eternal your Almighty commands you to do these statutes and judgements. You shall keep and do them with all your heart and with all your soul.

Drash דְּרָשׁ

The fish and the fox

Sometimes the safe path leads nowhere. A friend says, "Don't take risks, keep quiet". And you know you cannot live without it. The midrash tells of such a choice by Rabbi Akiva.

Midrash Tanchuma (Buber): the authorities forbade teaching Torah, and Rabbi Akiva went on teaching. To a reproach he answered with a parable: fish will not go to a fox on dry land, for their life is in the water. So the life of Israel is in the Torah. Rabbi Akiva was executed, and he died with the words of the Shema on his lips.

How Midrash Tanchuma (Buber) explain it

Midrash Tanchuma (Buber) With all your heart

Rabbi Eliezer ben Yaakov says: Scripture came to warn Israel against something else. "And with all your soul": even if He takes your soul.

Once the authorities decreed that no one may busy himself with Torah. Rabbi Akiva went, sat and busied himself with Torah. Pappus ben Yehudah came, found him and said: "Rabbi, you are endangering yourself, for you are breaking the king's decree". Rabbi Akiva answered him: "I will tell you a parable. What is this like? Like a fox walking along a river bank, who saw fish there. He said to them: 'Come to me, I will hide you in the clefts of the rocks, and do not be afraid.' They answered: 'You are called the cleverest of the animals, but you are simply a fool. All our life is only in the water, and you tell us to go onto dry land.' So all the life of Israel is only in the Torah, as it is written: 'For it is your life and the length of your days' (Devarim / Deuteronomy 30:20). And you say: you are endangering yourself."

A few days later both of them were seized. Pappus said to Rabbi Akiva: "Happy are you, who were seized for words of Torah. Woe to Pappus, who was seized for idle things."

When Rabbi Akiva was taken out to be executed, it was the time for reading the Shema. They were tearing his flesh, and he was reading the Shema. Of such David said: "From men, by Your hand, Eternal" (Tehillim / Psalms 17:14). Rabbi Chanina bar Papa said: do not read "from men" (מִמְתִים) but "those who give up their lives" (מְמִיתִים): those who give their lives for the Torah, which was given for this. People who see them say to each other: "They have sins, that is why they are killed." And they do not know that their share is in eternal life and all good is stored up for them, as it says: "And with Your treasure You fill their belly" (Tehillim / Psalms 17:14). And more than that, they merit good for their children after them.

And because Israel give their lives for the Torah and for the holiness of the Name of the Holy One, blessed is He, the Holy One, blessed is He, makes them a blessing in the world, as it says: "You have chosen the Eternal today" (Devarim / Deuteronomy 26:17). As Israel make the Holy One, blessed is He, the one chosen, so the Holy One, blessed is He, makes them the ones chosen, as it says: "And the Eternal has chosen you today" (Devarim / Deuteronomy 26:18). Rabbi Yehoshua ben Levi said: as the summit rules, so Israel will one day overcome the four kingdoms, as it says: "And to set you above all the nations He has made, for praise, for a name and for glory" (Devarim / Deuteronomy 26:19).

Takeaway

The decree against teaching Torah was a decree of the Roman authorities. The same story of Rabbi Akiva and Pappus is in the Talmud (Berakhot 61b).
"With all your soul" (נֶפֶשׁ) also means "with all your life": Rabbi Akiva fulfilled it literally when he died with the words of the Shema.
Rabbi Chanina bar Papa changes the vowels of one word: "from men" (מִמְתִים) becomes "those who give up their lives" (מְמִיתִים). The letters stay, the vowels change.
The words of Rabbi Yehoshua ben Levi rest on "above (עֶלְיוֹן) all the nations" in verse 26:19.