Sayyiduna Abu al-Tufayl (may Allah be pleased with him) reports this saying of the Prophet (peace and blessings be upon him): "Whoever earns wealth unlawfully and then frees a slave with it or maintains ties of kinship with it, that will be a sin."
Al-Tabarani recorded it; its chain contains a narrator, Muhammad bin Aban al-Ju'fi, who is da'if (weak).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الزهد / 18106