Language:
كتاب الإكراه
89  
(Statements made under) Coercion
(1)
Chapter: Whoever preferred to be beaten killed and humiliated rather than to revert to Kufr
(1)
باب مَنِ اخْتَارَ الضَّرْبَ وَالْقَتْلَ وَالْهَوَانَ عَلَى الْكُفْرِ
Sahih al-Bukhari 6943

Narrated Khabbab bin Al-Art:

We complained to Allah's Messenger (ﷺ) (about our state) while he was leaning against his sheet cloak in the shade of the Ka`ba. We said, "Will you ask Allah to help us? Will you invoke Allah for us?" He said, "Among those who were before you a (believer) used to be seized and, a pit used to be dug for him and then he used to be placed in it. Then a saw used to be brought and put on his head which would be split into two halves. His flesh might be combed with iron combs and removed from his bones, yet, all that did not cause him to revert from his religion. By Allah! This religion (Islam) will be completed (and triumph) till a rider (traveler) goes from San`a' (the capital of Yemen) to Hadramout fearing nobody except Allah and the wolf lest it should trouble his sheep, but you are impatient." (See Hadith No. 191, Vol. 5)

حَدَّثَنَا مُسَدَّدٌ، حَدَّثَنَا يَحْيَى، عَنْ إِسْمَاعِيلَ، حَدَّثَنَا قَيْسٌ، عَنْ خَبَّابِ بْنِ الأَرَتِّ، قَالَ شَكَوْنَا إِلَى رَسُولِ اللَّهِ صلى الله عليه وسلم وَهْوَ مُتَوَسِّدٌ بُرْدَةً لَهُ فِي ظِلِّ الْكَعْبَةِ فَقُلْنَا أَلاَ تَسْتَنْصِرُ لَنَا أَلاَ تَدْعُو لَنَا‏.‏ فَقَالَ ‏ "‏ قَدْ كَانَ مَنْ قَبْلَكُمْ يُؤْخَذُ الرَّجُلُ فَيُحْفَرُ لَهُ فِي الأَرْضِ فَيُجْعَلُ فِيهَا، فَيُجَاءُ بِالْمِنْشَارِ فَيُوضَعُ عَلَى رَأْسِهِ فَيُجْعَلُ نِصْفَيْنِ، وَيُمَشَّطُ بِأَمْشَاطِ الْحَدِيدِ مَا دُونَ لَحْمِهِ وَعَظْمِهِ، فَمَا يَصُدُّهُ ذَلِكَ عَنْ دِينِهِ، وَاللَّهِ لَيَتِمَّنَّ هَذَا الأَمْرُ، حَتَّى يَسِيرَ الرَّاكِبُ مِنْ صَنْعَاءَ إِلَى حَضْرَمَوْتَ لاَ يَخَافُ إِلاَّ اللَّهَ وَالذِّئْبَ عَلَى غَنَمِهِ، وَلَكِنَّكُمْ تَسْتَعْجِلُونَ ‏"‏‏.‏
Reference : Sahih al-Bukhari 6943
In-book reference : Book 89, Hadith 4
USC-MSA web (English) reference : Vol. 9, Book 85, Hadith 76
  (deprecated numbering scheme)