Abu Saeed Khudri reported,

The Messenger of Allah ﷺ said, "Do not write anything from me, and whoever has written anything from me other than the Quran, let him erase it. Narrate from me, there is no harm in that. But whoever lies about me," Hammam said, "I think he said, 'deliberately,'" "let him take his seat in the Fire."

Muslim 7510

Sahih

حدثنا هداب بن خالد الأزدي حدثنا همام عن زيد بن أسلم عن عطاء بن يسار

عن أبي سعيد الخدري

أن رسول الله ﷺ قال لا تكتبوا عني ومن كتب عني غير القرآن فليمحه وحدثوا عني ولا حرج ومن كذب علي قال همام أحسبه قال متعمدا فليتبوأ مقعده من النار

مسلم 7510صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Asceticism and heart-softening matters
Chapter
Verification in hadith and the ruling on writing knowledge
Numbering
Darussalam 7510
Muslim 7510