What the Rishonim say about freeing your slave.
Ritva, Gittin 38b. Rabeinu nr"u wrote, from here we see that it is not a real aseh, rather only a rabbinic prohibition, and they connected it (asmachta) to a pasuk, and Rabi Akiva who says it is an obligation, means a rabbinic obligation.
Meiri, Gittin asks on this opinion that it is only midirabanan: it does not seem so, for we certainly pasken like Rabi Akiva that is in an obligation. Furthermore, Rabi Eliezer also holds like him, but holds that the aseh, even though it is from the Torah, he was lenient in it in place of another mitzvah, since it is not equal to eveyone, since there is no obligation to acquire a slave to fulfill the mitzvah of leolam bahem taavodu. (Interesting; we'll return to that concept when we discuss zonah.)
Ramban Gittin 38b s.v. Mitzvah Shani. And because of the mitzvah to dave with a minyan we will push aside a mitzvas aseh in the Torah? It's possible that the Torah only said leolam bahem taavodu because of the prohibition against giving them a gift for no reason (matnas chinam) like it says regarding an idolotor: lo sechaneim. But when he freed him when he (the slave) paid for himself, or because of a mitzvah or need of the master, it isn't for no reason and is allowed. And we can also answer that it does push off a mitzvah in the Torah since "when Hashem comes to a beis knesses and does not find a minyan, He immediately gets angry." (Interesting - see what I wrote in point 2 in Part 2. I hadn't seen this Ramban at that time.)
Chiddushei HaRan, Gittin 38a s.v. mitzvah shani. As if to say, the Torah did not say leolam bahem taavodu except not to free them for no reason, but when he frees him because of a mitzvah, it's like the slave paid the master for himself and is allowed.
Rashba Gittin 38b s.v. ha diamrinan asks on the first answer of Ramban: The isur of lo sechaneim does not apply to Ger Toshav and Eved Knaani. (That's his opinion; Ramban and Ran certainly held it does apply.) Rather, here because of a public mitzvah or to stop many people from an aveira (that was another case) it's allowed.
Regarding Lo Sechaneim, Rav Ahron Soloveichik had amazing Torah on this subject. See Od Yisrael Yosef B'ni Chai, Siman 3, and Perach Mateh Ahron, Hil. Avodas Kochavim 9:16.
Rashba, Shabbos 4a s.v. ha diamran (near end) says that for a half-slave, half-free (where one partner in the slave freed his portion of the slave) there is no law of leolam bahem taavodu because of the free part of him.
This Rashba has no application to the case of Rabi Eliezer.