Narrated Abu Hurairah:The Messenger of Allah (ﷺ) as saying: If anyone leaves property, it goes to his heirs. And if anyone leaves dependents (without resources), they come to us.
حَدَّثَنَا حَفْصُ بْنُ عُمَرَ، حَدَّثَنَا شُعْبَةُ، عَنْ عَدِيِّ بْنِ ثَابِتٍ، عَنْ أَبِي حَازِمٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " مَنْ تَرَكَ مَالاً فَلِوَرَثَتِهِ وَمَنْ تَرَكَ كَلاًّ فَإِلَيْنَا " .
AbuDaud
Tribute, Spoils, and Rulership (Kitab Al-Kharaj, Wal-Fai' Wal-Imarah) • Hadith 2955