The Messenger of Allah (ﷺ) forbade selling or giving away the right to inheritance by a manumitted slave.

Sunan Abi Dawud Book 19, Hadith 35