It is not valid to stipulate wala’ for someone who is not the one who frees
Linguistic explanation: The word ولاء means “support, kinship, love and ownership”.
Technical definition: ولاء is a relationship by virtue of which an owner inherits from the slave he has freed, provided that his relatives are not present.
[Al-Fara’id: p. 20]
Barirah (a slave woman) came to Aisha (may Allah be pleased with her) and said: I have entered into a mukataba agreement with my master for nine uqiyyah of silver, which I will pay at one uqiyyah per year, so please help me. Aisha (may Allah be pleased with her) said: “If your master hands the right of wala’ over to me in return for my paying your total sum in one payment, I am ready to do that.” Barirah asked her master this, and he refused. Then she came back to Aisha (may Allah be pleased with her). At that time the Messenger of Allah ﷺ was also sitting there. Barirah mentioned her master’s refusal, so Aisha (may Allah be pleased with her) told the whole story to the Messenger of Allah ﷺ. Hearing this, he ﷺ said:
خذيها و اشترطى لهم الولاء فإنما الولاء لمن أعتق
“Take her, and stipulate wala’ for them, for wala’ belongs only to the one who frees.”
Aisha (may Allah be pleased with her) did so. After that the Messenger of Allah ﷺ stood up to address the people, and after praising and glorifying Allah, he said:
أما بعد فما بال رجال يشترطون شروطا ليست فى كتاب الله عزوجل؟ ما كان من شرط ليس فى كتاب الله فهو باطل وإن كان مائة شرط ، قضاء الله أحق ، وشرط الله أوثق وإنما الولاء لمن أعتق
“What is the matter with people who stipulate conditions that are not in the Book of Allah? (Remember!) Any condition that is not in the Book of Allah is void, even if there were a hundred conditions. Allah’s decree is the most right, and Allah’s condition is the most firm. Wala’ belongs to the one who frees.”
[Bukhari: 2561, Kitab al-Itq: Bab ma yajuz min shurut al-mukatab, Muslim: 1504, Muwatta: 780/2, Abu Dawud: 3929, Tirmidhi: 2124, Ibn Majah: 2521, Ahmad: 81/6, Abd al-Razzaq: 16161, Abu Ya’la: 411/7, Ibn Hibban: 3258 – al-Ihsan, Daraqutni: 22/3, Bayhaqi: 336/5]
(Abu Hanifah, may Allah have mercy on him) The sale of wala’ is permissible.
(Ibn al-Qayyim, may Allah have mercy on him) He has established that the sale of wala’ is not permissible.
(Malik, Shafi’i, Ahmad, may Allah have mercy on them) They hold the same view.
[A’lam al-Muwaqqi’in: 339/4, Al-Rawdah al-Nadiyyah: 328/3]