Imam al-Shafi'i (may Allah have mercy on him) said: "He does not become his mawla by (accepting) Islam (at his hands), nor by (mutual) alliance."
And he argued for this from the words of Allah Almighty to His Prophet (peace and blessings be upon him) concerning Zayd bin Harithah (may Allah be pleased with him): "Call them by (the names of) their fathers; that is more just in the sight of Allah. But if you do not know their fathers, then they are your brothers in religion and your mawali (freed dependants)." [Surah al-Ahzab: 5]
And He said: "And (remember) when you said to the one upon whom Allah had bestowed favour and upon whom you (too) had bestowed favour." [Surah al-Ahzab: 37]
So Allah Almighty attributed the mawali to two ascriptions: one of them to the fathers, and the other to wala'; and He made wala' arise from the favour (that is, the kindness of freeing).
Ibn Umar (may Allah be pleased with him) narrates from Aishah (may Allah be pleased with her) that Aishah (may Allah be pleased with her) wanted to buy a slave girl in order to free her. Her owners said: We will sell her, but her wala' will be ours. Aishah (may Allah be pleased with her) mentioned this to the Prophet (peace and blessings be upon him), and he (peace and blessings be upon him) said: "Do not let this stop you from buying her. Wala' belongs to the one who frees."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الولاء / 21448