Language:
كتاب الديات
87  
Blood Money (Ad-Diyat)
(17)
Chapter: If someone kills himself by mistake, there is no Diya
(17)
باب إِذَا قَتَلَ نَفْسَهُ خَطَأً فَلاَ دِيَةَ لَهُ
Sahih al-Bukhari 6891

Narrated Salama:

We went out with the Prophet (ﷺ) to Khaibar. A man (from the companions) said, "O 'Amir! Let us hear some of your Huda (camel-driving songs.)" So he sang some of them (i.e. a lyric in harmony with the camels walk). The Prophet (ﷺ) said, "Who is the driver (of these camels)?" They said, "Amir." The Prophet said, "May Allah bestow His Mercy on him !" The people said, "O Allah's Messenger (ﷺ)! Would that you let us enjoy his company longer!" Then 'Amir was killed the following morning. The people said, "The good deeds of 'Amir are lost as he has killed himself." I returned at the time while they were talking about that. I went to the Prophet (ﷺ) and said, "O Allah's Prophet! Let my father be sacrificed for you! The people claim that 'Amir's good deeds are lost." The Prophet (ﷺ) said, "Whoever says so is a liar, for 'Amir will have a double reward as he exerted himself to obey Allah and fought in Allah's Cause. No other way of killing would have granted him greater reward."

حَدَّثَنَا الْمَكِّيُّ بْنُ إِبْرَاهِيمَ، حَدَّثَنَا يَزِيدُ بْنُ أَبِي عُبَيْدٍ، عَنْ سَلَمَةَ، قَالَ خَرَجْنَا مَعَ النَّبِيِّ صلى الله عليه وسلم إِلَى خَيْبَرَ فَقَالَ رَجُلٌ مِنْهُمْ أَسْمِعْنَا يَا عَامِرُ مِنْ هُنَيْهَاتِكَ‏.‏ فَحَدَا بِهِمْ، فَقَالَ النَّبِيُّ صلى الله عليه وسلم ‏"‏ مَنِ السَّائِقُ ‏"‏ قَالُوا عَامِرٌ‏.‏ فَقَالَ ‏"‏ رَحِمَهُ اللَّهُ ‏"‏‏.‏ فَقَالُوا يَا رَسُولَ اللَّهِ هَلاَّ أَمْتَعْتَنَا بِهِ‏.‏ فَأُصِيبَ صَبِيحَةَ لَيْلَتِهِ فَقَالَ الْقَوْمُ حَبِطَ عَمَلُهُ، قَتَلَ نَفْسَهُ‏.‏ فَلَمَّا رَجَعْتُ وَهُمْ يَتَحَدَّثُونَ أَنَّ عَامِرًا حَبِطَ عَمَلُهُ، فَجِئْتُ إِلَى النَّبِيِّ صلى الله عليه وسلم فَقُلْتُ يَا نَبِيَّ اللَّهِ فَدَاكَ أَبِي وَأُمِّي، زَعَمُوا أَنَّ عَامِرًا حَبِطَ عَمَلُهُ‏.‏ فَقَالَ ‏"‏ كَذَبَ مَنْ قَالَهَا، إِنَّ لَهُ لأَجْرَيْنِ اثْنَيْنِ، إِنَّهُ لَجَاهِدٌ مُجَاهِدٌ، وَأَىُّ قَتْلٍ يَزِيدُهُ عَلَيْهِ ‏"‏‏.‏
Reference : Sahih al-Bukhari 6891
In-book reference : Book 87, Hadith 29
USC-MSA web (English) reference : Vol. 9, Book 83, Hadith 29
  (deprecated numbering scheme)