Sahih al-Bukhari, Book 55, Hadith 1 (Bukhari 2626)

Narrated `Abdullah bin `Umar:

Allah's Messenger (ﷺ) said, "It is not permissible for any Muslim who has something to will to stay for two nights without having his last will and testament written and kept ready with him."