Language:
كتاب الفرائض
85  
Laws of Inheritance (Al-Faraa'id)
(7)
Chapter: The inheritance of one’s grandchild
(7)
باب مِيرَاثِ ابْنِ الاِبْنِ، إِذَا لَمْ يَكُنِ ابْنٌ
Sahih al-Bukhari 6735

Narrated Ibn `Abbas:

Allah's Messenger (ﷺ) said, "Give the Fara'id (shares prescribed in the Qur'an) to those who are entitled to receive it; and whatever remains, should be given to the closest male relative of the deceased.'

حَدَّثَنَا مُسْلِمُ بْنُ إِبْرَاهِيمَ، حَدَّثَنَا وُهَيْبٌ، حَدَّثَنَا ابْنُ طَاوُسٍ، عَنْ أَبِيهِ، عَنِ ابْنِ عَبَّاسٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ أَلْحِقُوا الْفَرَائِضَ بِأَهْلِهَا فَمَا بَقِيَ فَهْوَ لأَوْلَى رَجُلٍ ذَكَرٍ ‏"‏‏.‏
Reference : Sahih al-Bukhari 6735
In-book reference : Book 85, Hadith 12
USC-MSA web (English) reference : Vol. 8, Book 80, Hadith 727
  (deprecated numbering scheme)