Shemot / Exodus 21:2
כִּי תִקְנֶה עֶבֶד עִבְרִי שֵׁשׁ שָׁנִים יַעֲבֹד וּבַשְּׁבִעִת יֵצֵא לַחָפְשִׁי חִנָּם׃
If you buy a Hebrew servant, six years he shall serve, and in the seventh he shall go out free, for nothing.
Pshat פְּשָׁט
Sold by the court
Rashi and Rashbam: this speaks of a thief who has nothing to repay what he stole, and the court sold him to work off the debt. Such a servant serves six years and goes out free. Of one who sold himself out of poverty the Torah speaks elsewhere, in the book of Vayikra.
How Rashi and Rashbam explain it
Remez רֶמֶז
The one who crossed over
Kli Yakar: "Hebrew" (עִבְרִי) sounds like "one who transgressed" (עוֹבֵר עֲבֵרָה). The thief crossed a line and went back to the ways of Avraham's forefathers, yet the Torah still calls him a brother. Noam Elimelech hears "wings" (אֵבֶר) in the word: one who serves the Creator rises as on wings.
How Kli Yakar and Noam Elimelech explain it
Drash דְּרָשׁ
Slaves themselves
Midrash Lekach Tov: Israel was itself a slave in Egypt, and the Holy One, blessed is He, redeemed it and gave it freedom. So the first law is not to enslave a brother for ever, but only until the seventh year. Kli Yakar adds: the brothers sold Yosef (Joseph), and because of it you came into slavery. Yet you were set free, so set free too.
How Midrash Lekach Tov and Kli Yakar explain it
Sod סוֹד
Freedom for nothing
Baal HaSulam: a person labours for the sake of rest, and six years are work on oneself, on the senses and on thought. The seventh is the light of the Creator's face: one does not arrive there as payment, it is received for nothing. Noam Elimelech: one who serves in humility reaches the seventh level, where there is freedom, and there everything comes without toil.
How Baal HaSulam and Noam Elimelech explain it