Who Wrote Hadith? The History of Hadith Writing and Compilation

Many people assume that hadith were written by one author, or that nothing was recorded until Imam al-Bukhari, two centuries after the Prophet ﷺ. Neither is accurate. So who wrote hadith? The words and actions of the Prophet ﷺ were seen and heard by his Companions, memorised and taught by them, written down by some of them in personal notebooks, collected officially under the Umayyad caliph Umar ibn Abd al-Aziz, organised by topic by scholars such as Ibn Shihab al-Zuhri and Imam Malik, and finally gathered in the great third-century collections of al-Bukhari, Muslim and the authors of the Sunan. This guide traces each stage, answers the claim that the Prophet forbade writing hadith, and explains how the chain of narration protected what was recorded.

Who Wrote Hadith? The Short Answer

No single person wrote hadith. The Prophet ﷺ did not author a hadith book himself; his Companions reported what he said and did, and the hadith were recorded in stages. Some Companions, such as Abdullah ibn Amr ibn al-As, wrote hadith in personal notebooks (suhuf) during the Prophet's lifetime. Umar ibn Abd al-Aziz (caliph 99 to 101 AH) was the first to order an official collection, instructing Abu Bakr ibn Hazm in Madinah to write down the Prophet's hadith, and Ibn Shihab al-Zuhri is named as the first to lay the foundation of systematic recording. The major collections that Muslims use today were compiled in the second and third centuries AH, by scholars such as Malik ibn Anas, Ahmad ibn Hanbal, al-Bukhari, Muslim, Abu Dawud, at-Tirmidhi, an-Nasa'i and Ibn Majah, each of whom recorded hadith with a full chain back to the Prophet ﷺ.

What Is a Hadith?

A hadith is a report of what the Prophet ﷺ said, did or approved, along with descriptions of his character. Every hadith has two parts: the isnad (the chain of narrators) and the matn (the text). The person who "wrote" a hadith in a book is therefore not its source; the source is the Prophet ﷺ, and the writer is the last link in a chain of named transmitters. For a fuller explanation of hadith and their role alongside the Quran, see the Academy's guide to hadeeth meaning and importance.

Timeline: How Hadith Were Written and Compiled

Stage Period What happened Key figures
1. The Prophet's lifetime c. 610 to 11 AH (632 CE) Companions memorised and practised his teaching; some wrote personal notebooks; written letters and treaties Abdullah ibn Amr ibn al-As, Abu Hurayrah (as transmitter), Ali ibn Abi Talib
2. Companions and Successors 11 to c. 100 AH Teaching circles in Madinah, Makkah, Kufa, Basra and Damascus; students' notebooks Aisha, Ibn Umar, Ibn Abbas, Jabir, Anas; Hammam ibn Munabbih
3. Official collection c. 99 to 124 AH Caliph's order to write down the Sunnah; first large-scale recording Umar ibn Abd al-Aziz, Abu Bakr ibn Hazm, Ibn Shihab al-Zuhri
4. Topical compilations 2nd century AH Books arranged by subject, mixing hadith with Companions' statements Malik (al-Muwatta), Ibn Jurayj, al-Awza'i, Sufyan ath-Thawri, Abd ar-Razzaq
5. The golden age of collections 3rd century AH Musnads, then authentic-only Sahihs, then the Sunan Ahmad ibn Hanbal, al-Bukhari, Muslim, Abu Dawud, at-Tirmidhi, an-Nasa'i, Ibn Majah
6. Later anthologies and commentaries 4th century AH onward Selections, gradings and explanations of the earlier books Al-Bayhaqi, an-Nawawi, Ibn Hajar al-Asqalani

Stage One: Hadith in the Prophet's Lifetime

Memory and Oral Teaching

The Companions learned the Prophet's teaching by listening, watching and imitating, and they passed it on mainly through memory and oral teaching. In a society that valued memorisation, this was a reliable method, and it was reinforced by daily practice: the way the Prophet prayed, fasted and performed Hajj was seen by thousands.

Did the Prophet ﷺ Forbid Writing Hadith?

Two sets of reports exist. In Sahih Muslim, Abu Sa'id al-Khudri reports that the Prophet ﷺ said:

لاَ تَكْتُبُوا عَنِّي، وَمَنْ كَتَبَ عَنِّي غَيْرَ الْقُرْآنِ فَلْيَمْحُهُ، وَحَدِّثُوا عَنِّي وَلاَ حَرَجَ

"Do not write from me, and whoever has written from me anything other than the Quran, let him erase it. And narrate from me, there is no harm in that." (Sahih Muslim 3004)

At the same time, Abdullah ibn Amr ibn al-As reported that he used to write everything he heard from the Prophet ﷺ, and when some people objected, the Prophet pointed to his mouth and told him:

اكْتُبْ، فَوَالَّذِي نَفْسِي بِيَدِهِ مَا يَخْرُجُ مِنْهُ إِلاَّ حَقٌّ

"Write, for by the One in whose hand is my soul, nothing comes out of it except the truth." (Sunan Abi Dawud 3646)

The Prophet ﷺ also ordered a sermon to be written for a man from Yemen named Abu Shah, saying "Write it for Abu Shah," as recorded in Sahih al-Bukhari. Scholars reconcile these reports in several ways, most commonly that the early prohibition was to keep the Quran from being mixed with other texts and was lifted once that risk had passed. On this view, the restriction eased during the Madinan period, and Companions such as Abdullah ibn Amr and Abu Hurayrah were allowed or encouraged to write. Note that even the prohibition report itself says "narrate from me, there is no harm."

The Notebook of Abdullah ibn Amr

Abu Hurayrah, the most prolific narrator among the Companions, said that no one had more hadith than he did except Abdullah ibn Amr, because Abdullah used to write and he did not (Sahih al-Bukhari 113). Abdullah's notebook became known as as-Sahifah as-Sadiqah ("the truthful notebook"), and its contents were passed down through his family and later included in collections such as Musnad Ahmad.

Stage Two: The Companions and Their Students

After the Prophet's death, the Companions spread across the growing Muslim world and taught in Madinah, Makkah, Kufa, Basra, Damascus and Egypt. Abu Hurayrah, Aisha, Ibn Umar, Ibn Abbas, Jabir ibn Abdullah and Anas ibn Malik were among the major transmitters. Their students, the Successors (Tabi'un), wrote what they heard in personal notebooks.

Many hadith that Muslims read today were passed on in this way. For example, Aisha's report that the one who recites the Quran skilfully will be with the noble angels, while the one who stumbles through it with difficulty receives a double reward, reached later generations through such chains and was recorded by al-Bukhari and Muslim; it is explained in the Academy's article on the hadith about Quran recitation with difficulty. Other narrations on the Quran's virtues are gathered in the Academy's article on the hadith on reciting Quran.

The Sahifah of Hammam ibn Munabbih

One notebook from this period survives today: the sahifah of Hammam ibn Munabbih, a student of Abu Hurayrah, containing around 138 hadith. Manuscripts of this and of the Musannaf of Abd ar-Razzaq were identified in the twentieth century, and scholars found their narrations were already preserved in the major hadith collections. In other words, the later books faithfully reproduced material that had been written down a century or more earlier.

Stage Three: The First Official Collection Under Umar ibn Abd al-Aziz

The Caliph's Order

The Sunnah was not written down officially in the Prophet's lifetime as the Quran was, and that Umar ibn al-Khattab considered compiling it but decided against it. The first to order an official collection was Umar ibn Abd al-Aziz, who wrote to his governor and judge in Madinah, Abu Bakr ibn Muhammad ibn Amr ibn Hazm, fearing that knowledge would disappear with the death of the scholars:

انْظُرْ مَا كَانَ مِنْ حَدِيثِ رَسُولِ اللَّهِ صلى الله عليه وسلم فَاكْتُبْهُ

"Look for what there is of the hadith of the Messenger of Allah ﷺ and write it down."

Al-Bukhari mentions this letter in the Book of Knowledge of his Sahih, in a chapter on how knowledge is lost.

Ibn Shihab al-Zuhri

The caliph's contemporary Muhammad ibn Muslim ibn Shihab al-Zuhri (d. 124 AH) is described as the first to lay the foundation of systematic recording; he wrote down everything he heard, hadith and Companions' statements alike. He was also commissioned to produce an official collection and arranged hadith by subject, a structure that most later hadith books follow.

Stage Four: The First Topical Books in the Second Century

Once official recording began, it spread quickly. Scholars of this generation included Ibn Jurayj and Ibn Ishaq in Makkah, Sa'id ibn Abi Arubah, ar-Rabi' and Malik in Madinah, Hammad in Basra, Sufyan ath-Thawri in Kufa and al-Awza'i in Syria. The most famous surviving book of this generation is al-Muwatta of Imam Malik ibn Anas (c. 711 to 795 CE), compiled in Madinah. It combines Prophetic reports with statements of the Companions and Successors and legal material, and shows that organised hadith writing existed well before the famous third-century collections.

Stage Five: The Golden Age of Hadith Collections

The Musnads

The third century AH was the peak of hadith compilation. It began with the musnads, arranged by Companion, such as the Musnad of Ahmad ibn Hanbal and that of Ishaq ibn Rahawayh.

The Two Sahihs

Next came the Sahihs of al-Bukhari and Muslim, the first books to include only authentic hadith. A remark by Ishaq ibn Rahawayh is said to have inspired the idea of an authentic-only collection, and al-Bukhari compiled the first such book. Al-Bukhari (194 to 256 AH) began memorising hadith as a child, travelled to Iraq, Syria, Egypt and the Hijaz, met scholars including Ishaq ibn Rahawayh and Ahmad ibn Hanbal, and is reported to have known about 600,000 hadith with their chains, from which he selected his book over about sixteen years. Muslim ibn al-Hajjaj (b. 206 AH) followed with his own Sahih.

The Sunan

The Sunan of Abu Dawud, at-Tirmidhi, an-Nasa'i and Ibn Majah, focused on legal hadith, completed the Six Books (Kutub al-Sittah), which are the most important collections in Sunni Islam.

Stage Six: Anthologies and Commentaries

Later scholars did not add new hadith from nowhere. They selected from, graded and explained the earlier books. Imam Yahya ibn Sharaf an-Nawawi (d. 676 AH), for example, drew mostly from the two Sahihs for his famous Forty Hadith and his Riyad as-Salihin, and Ibn Hajar al-Asqalani wrote Fath al-Bari, the major commentary on Sahih al-Bukhari. A good way to begin studying these selected hadith is the Academy's 40 Nawawi Hadith Course.

How the Isnad Protected What Was Written

Why Chains Became Essential

Chains were not needed at first, when hadith came directly from the Prophet ﷺ or from trusted Companions, but after the first civil war (the fitnah), fabrication became a concern and the isnad became essential. This led to 'ilm ar-rijal, the science of narrators' biographies, developed by scholars such as Ali ibn al-Madini. Every hadith in the major collections is presented with the full list of people who transmitted it, so later scholars could check whether each narrator was reliable and whether each actually heard from the one before him.

Grading the Hadith

Hadith are graded sahih (authentic), hasan (good) or da'if (weak), and fabricated reports are rejected. A sahih hadith requires an unbroken chain, reliable narrators with strong memory, no contradiction of stronger reports and no hidden defect. These terms are the foundation of hadith study and are taught step by step in the Academy's Simple Hadith Terminology Course.

Chains That Continue Today

The practice of transmitting hadith with a chain did not stop with the books. Scholars still receive the collections from their teachers with a connected chain back to the compilers, and through them to the Prophet ﷺ, and they authorise their students to teach in turn. That authorisation is called an ijazah, explained in the Academy's article on ijazah meaning in Islam.

Responding to the "Written 200 Years Later" Claim

Quran-only (Quranist) writers argue that the Prophet forbade writing his sayings, that the early caliphs discouraged hadith writing, and that collecting hadith only began with Umar ibn Abd al-Aziz and the books of al-Bukhari and others two centuries later. The historical record outlined above answers each point:

  • The prohibition report is matched by explicit permission to Abdullah ibn Amr and the order to "write it for Abu Shah," and even the prohibition report permits narrating.
  • Written notebooks existed in the first century, and one of them, the sahifah of Hammam ibn Munabbih, survives and matches the later collections.
  • The official collection under Umar ibn Abd al-Aziz began around 100 AH, and books such as the Muwatta followed in the second century, long before al-Bukhari.
  • Al-Bukhari did not compose hadith; he selected narrations with documented chains reaching back through named narrators to the Prophet ﷺ.

Frequently Asked Questions

Final Thoughts

Who wrote hadith? Not one author but a chain of people: the Companions who saw and heard the Prophet ﷺ, the students who wrote down what they learned, the caliph who ordered it collected, and the scholars who organised and verified it into the books we read today. Understanding that history, and the isnad system that runs through it, is the clearest answer to doubts about the Sunnah and the best starting point for studying it.

References and Resources