Sunan Abi Dawud, Hadith 2949

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.

حَدَّثَنَا حَفْصُ بْنُ عُمَرَ، حَدَّثَنَا شُعْبَةُ، عَنْ عَدِيِّ بْنِ ثَابِتٍ، عَنْ أَبِي حَازِمٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ مَنْ تَرَكَ مَالاً فَلِوَرَثَتِهِ وَمَنْ تَرَكَ كَلاًّ فَإِلَيْنَا ‏" ‏ ‏.‏

sunnah.com

also referenced under: Hadith 2955 (DarusSalam)