Yoreh Deah Siman 267 Seif 9

ט הַלּוֹקֵחַ עֶבֶד מִן הָעוֹבֵד כּוֹכָבִים, אֵין הַגּוּף קָנוּי לוֹ עַד שֶׁיַּטְבִּילֶנּוּ לְשֵׁם עַבְדוּת. הִלְכָּךְ אִם קָדַם וְטָבַל לְשֵׁם בֶּן חוֹרִין, הֲרֵי הוּא בֶּן חוֹרִין. לְפִיכָךְ צָרִיךְ לְהַטִּיל עָלָיו שׁוּם עֲבוֹדָה בְּעוֹדוֹ בַּמַּיִם, שֶׁיְּהֵא נִרְאֶה כְּעֶבֶד, שֶׁלֹּא יַקְדִּים וְיֹאמַר: אֲנִי טוֹבֵל לְשֵׁם בֶּן חוֹרִין. אֲבָל עוֹבֵד כּוֹכָבִים שֶׁמּוֹכֵר אֶת עַצְמוֹ לְיִשְׂרָאֵל, קוֹנֶה גּוּפוֹ מִיָּד וְאֵינוֹ יָכוֹל לְהַקְדִּים לִטְבֹּל לְשֵׁם בֶּן חוֹרִין.

 

If one acquires a slave from an idolater, we do not own him until we are able to immerse him in the name of slavehood.

If for whatever reason we purchase him before and then immerse him (it will end up being) for the sake of attaining his freedom, he therefore will be a free man. For this reason we need impose any form of servitude on him while in the water, so that it will look like he is a slave, if not beforehand he will say, I am immersing  for sake of becoming a free man. However if an idolater sells himself to a Jew,  we purchase him immediately and not give him the chance to immerse for the sake of his freedom.