Negative commandment · Lo Ta’aseh #58 of 613
For soldiers not to fear or become frightened of the enemy during war
שלא ייראו אנשי המלחמה ולא יפחדו מאויביהם בשעת מלחמה
The verse · Devarim 7:21
לֹא תַעֲרֹץ מִפְּנֵיהֶם כִּי־ה׳ אֱלֹהֶיךָ בְּקִרְבֶּךָ אֵל גָּדוֹל וְנוֹרָא
“Thou shalt not be terrified by them: for the Lord thy God is among you, a mighty God and terrible.”
The Rambam’s words
For soldiers not to fear or become frightened of the enemy during war, as [Deuteronomy 7:21] states: "Do not panic before them," and [Deuteronomy 3:22] states: "Do not fear them."
שלא ייראו אנשי המלחמה ולא יפחדו מאויביהם בשעת מלחמה, שנאמר "לא תערוץ, מפניהם" (דברים ז,כא), "לא, תיראום" (דברים ג,כב).
Why · Sefer HaChinuch #525
To not be terrified or to be afraid in war
“It is from the roots of the commandment that everyone in Israel should place his trust in G-d, may He be blessed, and not be afraid for his body in a situation that he can give glory to G-d, blessed be He, and to His people.”
Who & when
“And this commandment is practiced by males — as it is upon them to fight — at the time that Israel are upon their Land.”
Where in the Mishneh Torah
Hilchot Kings and Wars הלכות מלכים ומלחמות