Beis Yosef, Orach Chaim Siman 306:
The Rashba was asked: someone sent him a question on Shabbos, his daughter was forcibly removed from his house by a yisrael mumar to remove her from klal yisrael, if he can forcibly chase them on Shabbos lest the mumar scares her into denying her faith, may he travel even outside the techum shabbos or do other melacha, for this doubt (whether he will be successful in bringing her back) may he be mechalel shabbos like we may be in a case of safek nefashos? Rashba answered the matter must be studied, but he leaned towards saying that one may not be mechalel shabbos to save someone from sinning, as we see (Shabbos 4a) we do not say sin so your friend will benefit. Even a small sin is not allowed to save your friend from a big sin...
But Tosfos in Shabbos wrote at first like the Rashba but then asked from the mishna, a half-slave, half free man - we force the his master to free him, yet we hold whomever frees his slave violates a positive mitzvah, and Tosfos answers pru u'revu (procreation) is different because it is a great mitzvah. Another answer is only when one acted in a negligent manner and stuck the bread in the over shortly before shabbos do we not let someone violate a mitzvah on his behalf, but here he was not negligent we allow one to do a small aveira to save him from a great aveira... To the answer of "a great mitzvah," to save her from apostacy, and to the answer of negligence, she was not negligent [but rather was forcibly removed], to be mechalel shabbos to save her is allowed and is a mitzvah to do so and if he [the father] does not want to go, we would force him...even to desecrate shabbos with biblical prohibitions to save her is allowed because to save her from apostacy and her living the rest of her life desecrating shabbos, we say to desecrate shabbos now to save her is a small aveira.
This argument was raised a generation ago in regard to desecrating shabbos to save Jews stuck in the Soviet Union. For example, see Rav Shaul Yisraeli, Chavot Binyamin, siman 14. My gut reaction would be that it is not permitted. Why not? By that time (I think this was in the late 1970's & '80's) a majority of the Jews in the USSR had the status of tinok shenishba, a child raised in captivity among non-Jews (see Shabbos 68b and Rambam, Hil. Mamrim 3:3, and Shut Radvaz II 796 hashmata end of Chelek II). As tinokos shishbu, their not being rescued is not as big of an aveirah as saving someone who was shomer torah umitzvos but was removed to be "shmad-ed," so we wouldn't say this is a case of being mechalel shabbos to save future shabbasos. It was very important to rescue the Jews from the USSR, but from these shitos it would not override Shabbos.
That is how the Beis Yosef applies this halacha of freeing your slave to the question posed to the Rashba.