Negative commandment · Lo Ta’aseh #54 of 613
Not to distance an Edomite of the third generation from coming into the congregation
שלא להרחיק זרע עשיו מן הקהל אלא עד שלושה דורות
The verse · Devarim 23:8
לֹא־תְתַעֵב אֲדֹמִי כִּי אָחִיךָ הוּא לֹא־תְתַעֵב מִצְרִי כִּי־גֵר הָיִיתָ בְאַרְצוֹ
“Thou shalt not abhor an Edomite; for he is thy brother: thou shalt not abhor a Miżrian; because thou wast a stranger in his land.”
The Rambam’s words
Not to prevent the third generation of [converts from] the descendants of Esau from marrying among [the Jewish people], as [Deuteronomy 23:8] states: "Do not [utterly] despise an Edomite."
שלא להרחיק זרע עשיו מן הקהל אלא עד שלושה דורות, שנאמר "לא תתעב אדומי" (דברים כג,ח).
Why · Sefer HaChinuch #563
Not to distance an Edomite of the third generation from coming into the congregation
“The root of this commandment is revealed — that it is to inform us that we should not treat the seed of Esav [as] prohibited and that we should not distance them via an a fortiori argument (kal ve’chomer) from the Children of Ammon and Moav: to say that [since] G-d distanced us from Ammon and Moav because of one time that they did not greet us with bread and water, is it not all the more so with the Edomites and the Egyptians who caused so much pain to Israel?”
Who & when
“This prohibition that we are prevented from distancing them after they have converted is practiced in every place and at all times by males and females.”
Where in the Mishneh Torah
Hilchot Forbidden Intercourse הלכות איסורי ביאה