Language:
كتاب الجنائز
23  
Funerals (Al-Janaa'iz)
(66)
Chapter: To offer the (funeral) Salat on the grave after the burial of the deceased
(66)
باب الصَّلاَةِ عَلَى الْقَبْرِ بَعْدَ مَا يُدْفَنُ
Sahih al-Bukhari 1337

Narrated Abu Huraira:

A black person, a male or a female used to clean the Mosque and then died. The Prophet (p.b.u.h) did not know about it . One day the Prophet (ﷺ) remembered him and said, "What happened to that person?" The people replied, "O Allah's Messenger (ﷺ)! He died." He said, "Why did you not inform me?" They said, "His story was so and so (i.e. regarded him as insignificant)." He said, "Show me his grave." He then went to his grave and offered the funeral prayer.

حَدَّثَنَا مُحَمَّدُ بْنُ الْفَضْلِ، حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، عَنْ ثَابِتٍ، عَنْ أَبِي رَافِعٍ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ أَنَّ أَسْوَدَ ـ رَجُلاً أَوِ امْرَأَةً ـ كَانَ يَقُمُّ الْمَسْجِدَ فَمَاتَ، وَلَمْ يَعْلَمِ النَّبِيُّ صلى الله عليه وسلم بِمَوْتِهِ فَذَكَرَهُ ذَاتَ يَوْمٍ فَقَالَ ‏"‏ مَا فَعَلَ ذَلِكَ الإِنْسَانُ ‏"‏‏.‏ قَالُوا مَاتَ يَا رَسُولَ اللَّهِ‏.‏ قَالَ ‏"‏ أَفَلاَ آذَنْتُمُونِي ‏"‏‏.‏ فَقَالُوا إِنَّهُ كَانَ كَذَا وَكَذَا قِصَّتَهُ‏.‏ قَالَ فَحَقَرُوا شَأْنَهُ‏.‏ قَالَ ‏"‏ فَدُلُّونِي عَلَى قَبْرِهِ ‏"‏‏.‏ فَأَتَى قَبْرَهُ فَصَلَّى عَلَيْهِ‏.‏
Reference : Sahih al-Bukhari 1337
In-book reference : Book 23, Hadith 92
USC-MSA web (English) reference : Vol. 2, Book 23, Hadith 421
  (deprecated numbering scheme)