When Egypt runs out of cash during the famine years described in Parshas VaYigash, the populace comes to Yosef and asks him to buy them as slaves and buy their land in exchange for food (47:19). The Torah tells us:
וַיִּקֶן יוֹסֵף אֶת-כָּל-אַדְמַת מִצְרַיִם, לְפַרְעֹה,
Yosef bought up all the land for Pharoah...
Ramban notes the omission: Yosef buys the land, but he does not buy the people as slaves. Even in the continuation of the parsha, we read:
וַיֹּאמֶר יוֹסֵף אֶל-הָעָם, הֵן קָנִיתִי אֶתְכֶם הַיּוֹם וְאֶת-אַדְמַתְכֶם לְפַרְעֹה
The pasuk distinguishes between the purchase of the people, which was done "hayom," on a temporary basis -- meaning they were the equivalent of hired workers -- and the purchase of the land, which is not qualified with that same adjective of "hayom," and apparently was a permanent sale (see Meshech Chochma).
The Ramban does not address himself to why Yosef did not take the people up on their offer to become slaves, but I think the reason is obvious in light of Yosef's background. Yosef was sold by his brothers and was bounced from the Midyanim to the Egyptians and then finally even landed in prison before becoming appointed viceroy by Pharoah. Having personally suffered the degradation of being sold as a slave, it would be an anathema to Yosef to buy and sell other human beings as slaves.