Vayikra25:39

וְכִי־יָמוּךְ אָחִיךָ עִמָּךְ וְנִמְכַּר־לָךְ לֹא־תַעֲבֹד בּוֹ עֲבֹדַת עָבֶד׃

And if your brother becomes poor beside you and sells himself to you, you shall not make him work the work of a slave.

Vayikra 25:39

וְכִי־יָמוּךְ אָחִיךָ עִמָּךְ

Vayikra / Leviticus 25:39

וְכִי־יָמוּךְ אָחִיךָ עִמָּךְ וְנִמְכַּר־לָךְ לֹא־תַעֲבֹד בּוֹ עֲבֹדַת עָבֶד׃

And if your brother becomes poor beside you and sells himself to you, you shall not make him work the work of a slave.

Pshat פְּשָׁט

Not the work of a slave

Rashi: "the work of a slave" is degrading work that marks him as a slave: not carrying his master's things to the bathhouse and not putting on his shoes. Haamek Davar: these bans speak of one taken into the house for household service, for only there are there honoured and degrading tasks. And only one who is known is taken into the house, so it says "beside you."

How Rashi and Haamek Davar explain it

Remez רֶמֶז

The last step

Malbim: the word "becomes poor" teaches that a person sells himself only when poor, and only at the very end, after field, house, a loan at interest and his daughter. From here is proof of the words of the Rambam: one may not sell himself to pay a debt. The Talmud: "sells himself to you": not to you, but to a stranger. One who did not grasp the sign ends by selling himself to a stranger.

How Malbim and Talmud, Arakhin explain it

Drash דְּרָשׁ

Where is the covenant?

Aggadat Bereshit: Yehudah said to the ruler of Egypt: we all have one Father, why do you betray us? We returned the money we found, kept every condition, and you say: "The one with whom the goblet was found shall be my slave." Where is the covenant the Eternal made in the Torah: "you shall not make him work the work of a slave"? Midrash Lekach Tov: even when a brother sold himself, treat him as a brother and do not lord it over him.

How Aggadat Bereshit and Midrash Lekach Tov explain it

Sod סוֹד

When the Most High serves the tzaddik

The Noam Elimelech: the verse hints at a third tzaddik, who came into the world again, in a new incarnation, and is not at the level of a new soul. "Your brother" is the Eternal, who was a brother to you and has now become like a stranger. To the perfect tzaddik the Eternal, as it were, listens like a servant: the tzaddik decrees and the Holy One fulfils. But a lower tzaddik is warned: "do not make Him work the work of a slave," but plead with Him greatly when you are in need.

How Noam Elimelech explain it