Sahih al-Bukhari, Hadith 2740

Narrated Talha bin Musarrif: I asked `Abdullah bin Abu `Aufa "Did the Prophet make a will?" He replied, "No," I asked him, "How is it then that the making of a will has been enjoined on people, (or that they are ordered to make a will)?" He replied, "The Prophet bequeathed Allah's Book (i.e. Qur'an).

حَدَّثَنَا خَلاَّدُ بْنُ يَحْيَى، حَدَّثَنَا مَالِكٌ، حَدَّثَنَا طَلْحَةُ بْنُ مُصَرِّفٍ، قَالَ سَأَلْتُ عَبْدَ اللَّهِ بْنَ أَبِي أَوْفَى ـ رضى الله عنهما ـ هَلْ كَانَ النَّبِيُّ صلى الله عليه وسلم أَوْصَى فَقَالَ لاَ‏.‏ فَقُلْتُ كَيْفَ كُتِبَ عَلَى النَّاسِ الْوَصِيَّةُ أَوْ أُمِرُوا بِالْوَصِيَّةِ قَالَ أَوْصَى بِكِتَابِ اللَّهِ‏.‏

sunnah.com