The Messenger of Allah ﷺ said, "People of two different religions do not inherit from one another."
حدثنا موسى بن إسمعيل حدثنا حماد عن حبيب المعلم عن عمرو بن شعيب عن أبيه
قال رسول الله ﷺ لا يتوارث أهل ملتين شتى
[Its isnad is hasan]. Ibn Majah narrated it in Faraid, chapter on the inheritance of the people of Islam from the people of shirk, hadith 2731, from the hadith of Amr bin Shuayb through this chain, and Ibn Jarud graded it sahih, hadith 967.