كتاب الجهاد والسير
32  
The Book of Jihad and Expeditions
(16)
Chapter: The words of the Prophet (saws): "We (Prophets) have no heirs and whatever we leave behind is charity."
(16)
باب قَوْلِ النَّبِيِّ صلى الله عليه وسلم ‏"‏ لاَ نُورَثُ مَا تَرَكْنَا فَهُوَ صَدَقَةٌ ‏"‏ ‏‏
Sahih Muslim 1760 a

It has been narrated on the authority of Abu Huraira that the Messenger of Allah (ﷺ) said:

My heirs cannot share even a dinar (from my legacy) ; what I leave behind after paving maintenance allowance to my wives and remuneration to my manager is (to go in) charity.
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، قَالَ قَرَأْتُ عَلَى مَالِكٍ عَنْ أَبِي الزِّنَادِ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ لاَ يَقْتَسِمُ وَرَثَتِي دِيِنَارًا مَا تَرَكْتُ بَعْدَ نَفَقَةِ نِسَائِي وَمَئُونَةِ عَامِلِي فَهُوَ صَدَقَةٌ ‏"‏ ‏.‏
Reference : Sahih Muslim 1760a
In-book reference : Book 32, Hadith 64
USC-MSA web (English) reference : Book 19, Hadith 4355
  (deprecated numbering scheme)