The Messenger of Allah ﷺ addressed us at Mina while he was on his mount, which was chewing its cud, its saliva flowing between my shoulders. He said, "Allah has allotted to every person his share of inheritance, so no bequest may be made to an heir. The child belongs to the marriage bed, and the adulterer gets the stone. Whoever claims descent from someone other than his father, or attaches himself to people other than his own clients out of dislike for his own, upon him is the curse of Allah, the angels, and all mankind."Ibn Jafar said, and Yazid said, and Matar said, "No obligatory worship nor voluntary act will be accepted from him," or "no voluntary act nor obligatory worship."Ubayy said, Yazid said in his narration, "Nor any voluntary act." Amr bin Kharija reported to them that the Prophet ﷺ addressed them while on his mount.
حدثنا محمد بن جعفر حدثنا سعيد ويزيد بن هارون قال أخبرنا سعيد عن قتادة عن شهر بن حوشب عن عبد الرحمن بن غنم
خطبنا رسول الله ﷺ بمنى وهو على راحلته وهي تقصع بجرتها ولعابها يسيل بين كتفي فقال إن الله قسم لكل إنسان نصيبه من الميراث فلا تجوز لوارث وصية الولد للفراش وللعاهر الحجر ألا ومن ادعى إلى غير أبيه أو تولى غير مواليه رغبة عنهم فعليه لعنة الله والملائكة والناس أجمعين قال ابن جعفر وقال يزيد وقال مطر ولا يقبل منه صرف ولا عدل أو عدل ولا صرف قال أبي قال يزيد في حديثه ولا عدل إن عمرو بن خارجة حدثهم أن النبي ﷺ خطبهم على راحلته
Its isnad is hasan, like the one before it. The hadith was narrated by Nasai 6/247, no. 3642, in the Book of Wills, chapter on the invalidity of a bequest to an heir, and by Ibn Majah 2/905, no. 2713, similarly, and by Daraqutni in his Sunan 4/152.