It is narrated from Sayyiduna Abu Sa'id Khudri (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Do not write anything from me except the Noble Qur'an, and whoever has written anything from me other than the Qur'an should erase it."
Hadith Takhrijاس حدیث کی سند صحیح ہے۔ دیکھئے: [مسند أبى يعلی 1288] ، [صحيح ابن حبان 64] ، [تقييد العلم ص: 31-32] ۔ نیز دیکھئے: [فتح الباري 208/1]
Brief Explanation
(Commentary on Ahadith 460 to 464)
Hafiz Ibn Hajar rahimahullah has stated: A group among the Companions (Sahabah) and Followers (Tabi'in) disliked the writing of hadith and considered it preferable that, just as they had memorized hadith, others too should memorize it.
And in the beginning, the Messenger of Allah sallallahu alayhi wa sallam had prohibited the writing of hadith, and this was so that the Qur'an and hadith would not become mixed up. Later, the Prophet sallallahu alayhi wa sallam permitted the writing of hadith. Thus, Sayyiduna Abdullah ibn Amr radi Allahu anhuma and others used to write, as will be mentioned in the following chapter.