“The Messenger of Allah (ﷺ) forbade selling the right of inheritance or giving it away.”

Sunan Ibn Majah Book 23, Hadith 29