كتاب المغازى
64  
Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi)
(83)
Chapter: The sickness of the Prophet (saws) and his death
(83)
بَابُ مَرَضِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَوَفَاتِهِ
Sahih al-Bukhari 4460

Narrated Talha:

I asked `Abdullah bin Abu `Aufa "Did the Prophet (ﷺ) make a will? ' He replied, "No." I further asked, "How comes it that the making of a will was enjoined on the people or that they were ordered to make it? " He said, "The Prophet (ﷺ) made a will concerning Allah's Book."

حَدَّثَنَا أَبُو نُعَيْمٍ، حَدَّثَنَا مَالِكُ بْنُ مِغْوَلٍ، عَنْ طَلْحَةَ، قَالَ سَأَلْتُ عَبْدَ اللَّهِ بْنَ أَبِي أَوْفَى ـ رضى الله عنهما ـ أَوْصَى النَّبِيُّ صلى الله عليه وسلم فَقَالَ لاَ‏.‏ فَقُلْتُ كَيْفَ كُتِبَ عَلَى النَّاسِ الْوَصِيَّةُ أَوْ أُمِرُوا بِهَا قَالَ أَوْصَى بِكِتَابِ اللَّهِ‏.‏
Reference : Sahih al-Bukhari 4460
In-book reference : Book 64, Hadith 476
USC-MSA web (English) reference : Vol. 5, Book 59, Hadith 737
  (deprecated numbering scheme)