Negative commandment · Lo Ta’aseh #46 of 613
Not to ever dwell in the land of Egypt
שלא לשכון בארץ מצריים לעולם
The verse · Devarim 17:16
רַק לֹא־יַרְבֶּה־לּוֹ סוּסִים וְלֹא־יָשִׁיב אֶת־הָעָם מִצְרַיְמָה לְמַעַן הַרְבּוֹת סוּס וַה׳ אָמַר לָכֶם לֹא תֹסִפוּן לָשׁוּב בַּדֶּרֶךְ הַזֶּה עוֹד
“But he shall not multiply horses to himself, nor cause the people to return to Miżrayim, to the end that he should multiply horses: since the Lord has said to you, You shall henceforth return no more that way.”
The Rambam’s words
Not to ever dwell in the land of Egypt, as [Deuteronomy 17:16] states: "Do not ever return on this path again."
שלא לשכון בארץ מצריים לעולם, שנאמר "לא תוסיפון לשוב בדרך הזה, עוד" (דברים יז,טז).
Why · Sefer HaChinuch #500
To not ever dwell in the Land of Egypt
“It is from the roots of the commandment that [it is] because the people of Egypt are bad and sinners. And G-d, blessed be He, took us out from there and redeemed us, in His kindnesses, from their hand to give us merit, to walk in the ways of truth.”
Who & when
“And this prohibition is practiced in every place and at all times by males and females.”
Where in the Mishneh Torah
Hilchot Kings and Wars הלכות מלכים ומלחמות