Language:
كتاب الجهاد والسير
56  
Fighting for the Cause of Allah (Jihaad)
(110)
Chapter: To give a Bai'a for not to flee during a battle
(110)
باب الْبَيْعَةِ فِي الْحَرْبِ أَنْ لاَ يَفِرُّوا
Sahih al-Bukhari 2959

Narrated `Abdullah bin Zaid:

that in the time (of the battle) of Al-Harra a person came to him and said, "Ibn Hanzala is taking the pledge of allegiance from the people for death." He said, "I will never give a pledge of allegiance for such a thing to anyone after Allah's Messenger (ﷺ)."

حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ، حَدَّثَنَا وُهَيْبٌ، حَدَّثَنَا عَمْرُو بْنُ يَحْيَى، عَنْ عَبَّادِ بْنِ تَمِيمٍ، عَنْ عَبْدِ اللَّهِ بْنِ زَيْدٍ ـ رضى الله عنه ـ قَالَ لَمَّا كَانَ زَمَنَ الْحَرَّةِ أَتَاهُ آتٍ فَقَالَ لَهُ إِنَّ ابْنَ حَنْظَلَةَ يُبَايِعُ النَّاسَ عَلَى الْمَوْتِ‏.‏ فَقَالَ لاَ أُبَايِعُ عَلَى هَذَا أَحَدًا بَعْدَ رَسُولِ اللَّهِ صلى الله عليه وسلم‏.‏
Reference : Sahih al-Bukhari 2959
In-book reference : Book 56, Hadith 170
USC-MSA web (English) reference : Vol. 4, Book 52, Hadith 206
  (deprecated numbering scheme)