Hadithcore
Hadith #2117370

Ibn 'Umar (RAA) narrated that The Messenger of Allah (ﷺ) said:

“The Wala’ (of a manumitted slave) is considered as one’s lineage, not to be sold or donated (refer to hadith no. 984).” Related by Ash-Shafi’i. Ibn Hibban and Al-Hakim graded it as Sahih. It is also related by Al-Bukhari and Muslim with different wording

وَعَنِ ابْنِ عُمَرَ رَضِيَ اَللَّهُ عَنْهُمَا قَالَ: قَالَ رَسُولُ اَللَّهِ ‏- صلى الله عليه وسلم ‏-{ " اَلْوَلَاءُ لُحْمَةٌ كَلُحْمَةِ اَلنَّسَبِ, لَا يُبَاعُ وَلَا يُوهَبُ" } رَوَاهُ اَلشَّافِعِيُّ, وَصَحَّحَهُ اِبْنُ حِبَّانَ, وَالْحَاكِم ُ [1]‏ وَأَصْلُهُ فِي "اَلصَّحِيحَيْنِ" بِغَيْرِ هَذَا اَللَّفْظ ِ [2]‏ .‏

References2 variants
Sunnah.com reference
Book 15, Hadith 12
Arabic/English book reference
Book 15, Hadith 1473