It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "There is no room for musa'ah (making slave-women commit fornication and then claiming their offspring) in Islam. Whoever practised musa'ah in the Jahiliyyah, I have attached (the child) to his 'asabah (paternal relatives). And whoever claims a child born without a valid marriage (that is, from fornication), he will neither inherit nor be inherited from."
Hadith Referenceالمعجم الأوسط / باب الألف / 1005
Hadith Takhrij«أخرجه الحاكم فى «المستدرك» برقم: 8084، وأبو داود فى «سننه» برقم: 2264، والبيهقي فى «السنن الكبرى» برقم: 12629، وأحمد فى «مسنده» برقم: 3483، والطبراني فى «الكبير» برقم: 12438»