It is narrated from Ibn Umar (may Allah be pleased with them both) that the Prophet (ﷺ) said: "Wala' is a bond just like the bond of lineage; it should neither be sold nor gifted."
Hadith Referenceمسند الإمام الشافعي / كتاب العتق والولاء والمدبر والمكاتب وحسن الملكة / 1090
Hadith Takhrijاخرجه البيهقي: 10/ 292 - وفى المعرفة السنن والآثار له (6053) - وصححه الحاكم: 4/ 341 - وابن حبان۔