It was narrated from Usamah bin Zaid, who attributed it to the Prophet (ﷺ):
“The Muslim does not inherit from a disbeliever and the disbeliever does not inherit from a Muslim.”