The case in question is that of a slave who fled from a pagan master to the holy land. It is of course assumed that the refugee was not flying from justice, but only from the tyranny of his lord.
Related Commentaries of Deuteronomy 23:15
Deuteronomy 23:15-16
15 Thou shalt not deliver unto his master the servant which is escaped from his master unto thee:
16 He shall dwell with thee, even among you, in that place which he shall choose in one of thy gates, where it liketh him best: thou shalt not oppress him.