Narrated Abdullah ibn Amr ibn al-As: The Prophet ﷺ said: people of two different religions would not inherit from one another.
Related hadith on this topic
Explanation & Benefits
Shaykh Umar Farooq Saeedi
Benefits and Issues:
Benefit: By this is meant both Muslims and disbelievers.
While the disbelievers, despite being upon their various religions, are considered one community (ummah), therefore inheritance passes between them.
Whereas, according to the statements of Imam Zuhri, Ibn Abi Layla, and Ahmad ibn Hanbal, a Jew does not inherit from a Christian,
a Magian does not inherit from a Jew,
and so on.
Source: Sunan Abu Dawood – Commentary by Shaykh Umar Farooq Saeedi, Page: 2911
Maulana Ataullah Sajid
Benefits and Issues:
(1)
By "two different communities (nations)" is meant the community of Islam and the community of disbelief.
(2)
A non-Muslim inherits from another non-Muslim, even if their religions are different from each other.
Source: Commentary on Sunan Ibn Mājah by Mawlānā ‘Atā’ullāh Sājid, Page: 2731