I asked, "O Messenger of Allah ﷺ! Where will you stay in Mecca? Will you stay in your house in Mecca?" He replied, "Has ʿAqil left any property or house?" ʿAqil along with Talib had inherited the property of Abu Talib. Jafar and ʿAli did not inherit anything as they were Muslims and the other two were non-believers. ʿUmar bin Al-Khattab used to say, "A believer cannot inherit (anything from an) infidel." Ibn Shihab, (a sub-narrator) said, "They (ʿUmar and others) derived the above verdict from Allah's Statement: "Verily! those who believed and Emigrated and strove with their life And property in Allah's Cause, And those who helped (the emigrants) And gave them their places to live in, These are (all) allies to one another." (8.72)
أَنَّهُ قَالَ يَا رَسُولَ اللَّهِ أَيْنَ تَنْزِلُ فِي دَارِكَ بِمَكَّةَ فَقَالَ وَهَلْ تَرَكَ عَقِيلٌ مِنْ رِبَاعٍ أَوْ دُورٍ وَكَانَ عَقِيلٌ وَرِثَ أَبَا طَالِبٍ هُوَ وَطَالِبٌ وَلَمْ يَرِثْهُ جَعْفَرٌ وَلاَ عَلِيٌّ ؓ شَيْئًا لأَنَّهُمَا كَانَا مُسْلِمَيْنِ وَكَانَ عَقِيلٌ وَطَالِبٌ كَافِرَيْنِ فَكَانَ عُمَرُ بْنُ الْخَطَّابِ ؓ يَقُولُ لاَ يَرِثُ الْمُؤْمِنُ الْكَافِرَ قَالَ ابْنُ شِهَابٍ وَكَانُوا يَتَأَوَّلُونَ قَوْلَ اللَّهِ تَعَالَى {إِنَّ الَّذِينَ آمَنُوا وَهَاجَرُوا وَجَاهَدُوا بِأَمْوَالِهِمْ وَأَنْفُسِهِمْ فِي سَبِيلِ اللَّهِ وَالَّذِينَ آوَوْا وَنَصَرُوا أُولَئِكَ بَعْضُهُمْ أَوْلِيَاءُ بَعْضٍ} الآيَةَ