Language:
كتاب الجنائز
23  
Funerals (Al-Janaa'iz)
(77)
Chapter: Can the dead body be taken out of its grave
(77)
باب هَلْ يُخْرَجُ الْمَيِّتُ مِنَ الْقَبْرِ وَاللَّحْدِ لِعِلَّةٍ
Sahih al-Bukhari 1351

Narrated Jabir:

When the time of the Battle of Uhud approached, my father called me at night and said, "I think that I will be the first amongst the companions of the Prophet (ﷺ) to be martyred. I do not leave anyone after me dearer to me than you, except Allah's Messenger (ﷺ)'s soul and I owe some debt and you should repay it and treat your sisters favorably (nicely and politely)." So in the morning he was the first to be martyred and was buried along with another (martyr). I did not like to leave him with the other (martyr) so I took him out of the grave after six months of his burial and he was in the same condition as he was on the day of burial, except a slight change near his ear.

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