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).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الولاء / Q21448