Praise be to Allah.and peace and blessings be upon the one after whom there is no Prophet.
A Muslim cannot inherit from a kaafir, and a kaafir cannot inherit from a Muslim, because of the hadeeth reported in Saheeh al-Bukhaari, in which the Prophet (peace and blessings of Allaah be upon him) said: “The Muslim does not inherit from the kaafir, and the kaafir does not inherit from the Muslim.” [This applies] even if the money were to be used for the purpose of sadaqah, because of the general applicability of the hadeeth, and because the Muslim is not commanded to do something haraam in order to achieve something prescribed by Islam. And Allaah knows best.
This is what Shaykh ‘Abd al-Azeez ibn Baaz said when I asked him about this matter. He said, “He should not ask for his inheritance even if he wants to give it away in charity, but if he is given the money, he can dispose of it through any charitable channel. And Allaah knows best.”