Read the Arabic text and available English translation from Sunan Ibn Majah, with its supplied source reference.
English : Vol. 4, Book 23, Hadith 2745
Grading supplied with this record: Hasan (Darussalam)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
It was narrated from "Amr bin Shu'aib, from his father, from his grandfather that the Messenger of Allah (ﷺ) said:
"Whoever commits adultery with a slave woman or a free woman, his child is illegitimate, and he cannot inherit from him or be inherited from (i.e., this child cannot inherit from him)."
Full reference and source
English : Vol. 4, Book 23, Hadith 2745
Arabic : Book 23, Hadith 2850
References, translations and numbering differ between editions. A URL number is an internal app record identifier, not universal hadith numbering. Only supplied grading is displayed; no new authenticity assessment is made.