According to the most accurate reports he was born in 828 in a village near Medina called Sorayya. to the ninth Shiite Imām, Muhammad al-Taqi, (also known as Imam Muhammad al-Jawad), and Lady Samānah or Susan, who was originally a Berber (from Northwest Africa). His father bestowed upon him the surname Abul-Hasan, after the surnames given to his grandfather Ali al-Ridha and his great grandfather Musa al-Kadhim. To differentiate between these three Abul Hasan, narrators usually call Musa al-Kadhim, abul Hasan the first, call Ali al-Ridha, Abul Hasan the second and call al-Hadi Abul Hasan the third.
After his father's death in 835, Ali al-Hadi assumed the official role of Imamate at the age of 7 or 8. The followers of his father were in agreement on his Imamate, except for a minor group who gathered around his older brother Musa who when dissociated himself from them, they turned to al-Hadi. Historians have mentioned that after his father's assassination at the will of Al-Mu'tasim, the Abbasid caliph ordered Umar bin al-Faraj to find a teacher in Medina for the young Imam (that must be one of the enemies of the Ahlul Bayt) in order to prevent Shiites from meeting him. He found al-Junaydi for this task, however, al-Junaydi often reported on the Imam's intelligence saying that the boy would provide perspectives on literature and understanding of the Quran and the revelations within. Al-Junaydi, impressed by him, concluded that it could only be by divine causes that the boy could be so knowledgeable, as a result, he dropped the animosity he had held towards the family of the prophet.
Throughout the later years of his Imamate, which coincided with the eight remaining years of the caliphate of Al-Mansur, and five years of the caliphate of next caliph Al-Wathiq, he lived peacefully in Medina engaging himself in teaching a large number of pupils mostly from Iraq, Persia, and Egypt. later on, however, the new Caliph, Al-Mutawakkil, became suspicious of the young Imam and decided to watch him more closely.
After Motawakkel came to throne, the governor of Medina, ʿAbdallāh ibn Moḥammad, wrote the caliph warning him about the activity of al-Hadi saying that he was given money with which he could buy weapons that could be used to revolt against the Caliph. When al-Hadi learned of what Abdullah bin Muhammad had told the caliph, he sent a letter to Mutawakkil defending himself against the accusations and complained about the governor. Apparently convinced of the harmless piousness of al-Hadi, Motawakkel wrote back to al-Hadi stating that he had deposed the governor. He nevertheless asked the Imam to come to Samarra (a military camp, not far from Baghdad which was the capital of Abbasids at the time). At the same time, Mutawakkil ordered Yahya ibn Harthama, the captain of the guard, to go to Medina both to investigate Abdullah's claims and to bring al-Hadi to Samarra. Yahya then searched the Imam's house and found nothing more than copies of the Quran and other religious books. It is said that when the imam approached Baghdad many people gathered to see him. The governor of the city himself rode out of the city to welcome him and stayed a part of night with him. At Sammera, however, the caliph did not immediately receive him, though assigned a house for his staying.
Even though Mutawakkil had no reason to be suspicious of al-Hadi, he insisted that he stay in Samarra under house arrest. According to Madelung, he was still able to move in the city and communicate with his followers, giving them instructions or receiving through them the annual Khums (the financial contributions of the faithful).
Yahya ibn Harthama, the captain of the guard, is narrated to have reported his experience as follows: "The Caliph Mutawakkel sent me to Medina with orders to bring Ali ibn Muhammad to answer certain accusations that had been made against him. When I arrived, his household made such wailing and lamentation as I had never heard. I tried to quiet them and assured them that I had received no orders to do him any harm. And when I searched the house where he lived, I found only a Quran, books of prayer and such things. So while I took him away, I offered him my services and showed him very high respect. But one day on the journey, when the sky was clear and the sun just rising, Ali put on a cloak when he mounted his horse and knotted the animal's tail. I was surprised at this, but it was only a little while afterwards that a cloud came up and there was a regular torrent of rain. Then Ali turned to me and said, I know that you did not understand that you saw me do, and that you imagine that I have had some unusual knowledge of this affair. It is not, however, as you supposed, but as I was brought up in a desert, I know the winds that come before rain. This morning the wind blew which does not deceive, and I noticed the odor of rain and so prepared for it. On our arrival in Baghdad, our first visit was to Ishak ibn Ibrahim, of the family of Tahir, who was the governor of the city. He said to me, O Abu Yahya, this man (Ali) is a descendant of the Apostle of God. You know Mutawakkil, and have influence with him, but if you urge him to kill this man, the Prophet, himself will be your enemy. I replied that I saw nothing in the conduct of Ali except what was altogether praiseworthy. I went on to Samarra, where I saw Wasif, the Turk, for I was one of his intimate friends. I swear before God, he said to me, if a single hair of the head of this man falls, I will myself demand satisfaction. I was somewhat surprised at the attitude taken by these men, and when I informed Mutawakkil of what I had heard in praise of the Imam, he gave him a handsome present and treated him with all sorts of honor."
Al-Hadi contributed to the books of argumentation that were compiled by Shiite scholars among which was a theological treatise on human Free Will and some other short texts and statements ascribed to al-Hadi are quoted by Abū Muḥammad al-Ḥasan ibn ʻAlī ibn al-Ḥusayn ibn Shuʻbah al-Harrānī.
It is said that once a scholar came in where al-Hadi had a meeting with masters of Hashemite (a clan Muhammad, the prophet had belonged to). Al-Hadi seated the scholar beside himself and treated him with great respect. The Hashemite protested saying: "why do you prefer him to the masters of Banu Hashim?’ Al-Hadi said: "Beware to be from those whom God has said about, Have you not considered those who are given a portion of the Book? They are invited to the Book of God that it might decide between them, then a part of them turn back and they withdraw. Do you accept the Book of God as a judge?" asked al-Hadi. They all said, "O son of the messenger of God, we do." Then al-Hadi tried to prove his stance by saying, "Has God not said God will exalt those of you who believe, and those who are given knowledge, in high degrees? God does not accept for a knowledgeable believer but to be preferred to an unknowledgeable believer, just as He wants a believer to be preferred to an unbeliever. God has said, God will exalt those of you who believe and those who are given knowledge, in high degrees. Has He said, God will exalt those, who are given honor of lineage, in high degrees? God has said, Are those who know and those who do not know alike? Then, how do you deny my honoring him for what God has honored him?"
On one occasion, al-Mutawakkil organized a conference to be held in his palace with theologians and jurisprudents he had invited. He had asked Ya'qub ibn Isaak known as ibn as-Sikkit to ask al-Hadi the questions that he didn't think the Imam could answer. One of the questions was that why God had sent Moses with the rod and white hand, sent Jesus with the healing of the blind and leprous and giving life to the dead, and sent Muhammad with the Quran and sword? Al-Hadi's answer goes as follows: "Allah sent Moses with the rod and white hand in a time where the predominant thing among people was magic. Therefore, Moses came to them with that and defeated their magic, dazed them, and proved authority over them. And Allah sent Jesus Christ with the healing of the blind and leprous and the giving of life to the dead by the will of Allah in a time where the predominant thing among people was medicine. Therefore, Jesus Christ came to them with that and defeated and dazed them. And Allah sent Muhammad with the Quran and sword in a time where the predominant things among people were sword and poetry. Therefore, Muhammad came to them with the Quran and sword and dazed their poetry, defeated their sword, and proved authority over them."
Yahya bin Aktham was another scholar who was invited to try the imam. It is said that after al-Hadi's answer to Yahya's questions, he turned to al-Mutawakkil and advised him saying, "We do not like you to ask this man about anything after my questions to him … In showing his knowledge there will be strengthening to Rafida (the Shiite)." One of the questions is the following:
"Tell me why Ali (the first Shiite Imam) killed the people of (the battle of) Siffin …whether they were attacking or fleeing and he finished off the wounded, but on the day of al-Jamal (Battle of the Camel) he did not ... Rather, he said, Whoever keeps to his house will be safe. Why did he do that? If the first decision was right, so the second would be wrong."
Al-Hadi replied: "The Imam of the people of the Battle of the Camel was killed and they had no leader to refer to. They went back to their homes without fighting, deceiving, or spying. They were satisfied (after the defeat) not to fight any further. But the people of Siffin belonged to a prepared company with a leader who supplied them with spears, armor, and swords, caring for them, giving them good gifts, preparing great monies for them, visiting their sick, curing their wounded, giving sumpters to their footers, helping their needy, and returning them to the fight…"
Whether or not it was possible to see God, was one of the common issues discussed at the time of al-Hadi who believed it was impossible to see Him. He argued that "seeing is not possible if there is no air (space) between the seer and the seen thing through which sight goes through. If there is no air and no light between the seer and the seen thing, there will be no sight. When the seer equals the seen thing in the cause of sight between them, sight takes place, but those who compare the seer (man) to Allah, they are mistaken because they liken Allah to man…for effects must relate to causes."
Another issue that the Imam dealt with was the belief that God has a body (the embodiment of God). Al-Hadi chastised those who believed it and stated that, "He, who claims that Allah is a body, is not from us, and we are free from him in this world and the after-world...body (substance) is created, and it is Allah Who has created and embodied it." To attribute Allah with embodiment is to characterize Him with need and to limit Him to a body. Essentially, it is wrong to equate God with created things due to His nature as our creator. Ali al-Hadi also expressed strong feelings about the impossibility of describing God's Essence. The rationale behind his objection was that God is so great that, as humans, we are incapable of conceiving how truly amazing He is, and that the only one that can truly describe God is God Himself. He then uses this as a segue into the belief that true Muslims, the Prophet, and the infallible imams cannot be described either, because their obedience to God draws them closer to the Essence of God, and descriptions cannot wholly encompass their virtuous qualities that result from submitting to God.
It is said that Mutawakkil showed courtesy toward the imam in Samarrah, and even preferred his judgment to other Faqihs; in the same time however, he troubled and even tried to kill the Imam. Mutawakkel was envious of the Imam because Imam’s position was exalted among the public. He wanted to belittle the Imam. His vizier counseled him, recommending him to give up, because it would make the public blame and criticize him. But he paid no attention to his vizier. To try to humiliate the Imam, Motawakkil ordered that the Imam along with the officials and notables, (so that it wouldn't look like the act was intended for the imam) dismount and travel on foot during a hot summer day while the caliph remained mounted on his horse. Zuraqa the chamberlain of al-Mutawakkil has narrated that he saw the Imam who had almost suffered a heat stroke, was breathing and sweating hard, so he approached him to calm him down by saying "Your cousin (Mutawakkil) did not intend to hurt you particularly." Al-Hadi looked at him and said "Stop that!" And then recited this Quranic verse,Enjoy yourselves in your abode for three days, that is a promise not to be belied. The promise here refers to the punishment which is mentioned in the previous verse for unjust people . Zuraqa related that he had a Shiite teacher who had been among his intimate friends. Zuraqa says "when I went home, I sent for him. When he came to me, I told him about what I heard from the Imam. He changed color and said to me, Be careful and store all what you have! Al-Mutawakkil shall die or be killed after three days. I was affected by his speech and asked him to leave. Then I thought with myself and said that it would not harm me to take precautions. If something like that happened, I would have taken my precaution, and if not, I would lose nothing. I went to the house of al- Mutawakkil and took all my money. I deposited them with one of my acquaintances." Within three days of that event, plotters assassinated the caliph; one of the assassins was actually his son, al-Muntasir.
Another account of this prediction stated that the Imam was imprisoned by the caliph, and it was that act which provoked the Imam to foretell of his death.
Ali al-Hadi was given a vast number of descriptive names throughout his life, among which al-Naqi (the pure one), al-Hadi (the Guide) were the most famous. However al-Askari (military; due to the town he had to live in was a military camp), Faqīh (jurisprudent), al-Aalim (knowledgeable) and At-Tayyib (generous, kind-hearted, good-natured…) were also among his epithets. It is said that al-Hadi exhibited extreme generosity, though himself at times had no money to pay with either. An example of which is an account that describes how a nomadic man came to the Imam to tell him of how he was heavily in debt and in need of assistance. Al-Hadi, being short of money himself, gave the man a note saying that he was in debt to the nomad, and instructed him to meet the Imam in a place where he had a meeting, and to insist that the Imam pay back the recorded debt. The nomad did as he was told, and the Imam apologized to the nomad in front of those at the meeting for being incapable of paying him back. The officials at the meeting reported the Imam's debt to the caliph, al-Mutawakkil, who then sent the Imam 30,000 dirhams, with which he then presented to the nomad.
In Twelver Shiism, he is described as being endowed with the knowledge of the languages of the Persians, Slavs, Indians and Nabataeans in addition to foreknowing unexpected storms and as accurately prophesying other events. In the presence of al-Mutawakkil, he unmasked a woman falsely claiming to be Zaynab, daughter of Ali, by descending into a lion's cage in order to prove that lions do not harm true descendants of Ali (a similar miracle is also attributed to his grandfather, Ali ar-Ridha). Al-hadi's miracles made some people to believe the claim of some Heretics like Ibn Hasakah who preached to people that al-Hadi was in fact God, and that they themselves were prophets sent by the imam to guide the Muslims. It is quoted from al-Hadi as denying them and instructing people about the extremists saying "Desert them! May Allah curse them. Block them up into narrow passages and if you find any of them, split his head with stone!""Faith is that which hearts acknowledge and deeds prove, and Islam is that which tongues witness and marriage becomes lawful with."
al-Hadi narrated from his forefathers that the Prophet said, "Love Allah for the blessings He gives you, and love me for the love of Allah, and love my household for my love!"
"It suffices for you to have good manners by giving up what you hate of others."
"He, who is certain of recompense (from Allah), will give generously."
"If one of you gives (charity) with his right hand, let him conceal that from his left hand, and if he prays, let him conceal that."
Madelung quotes Ebn Babuya as saying that al-Hadi was poisoned by Al-Mutawakkil or Al-Mu'tamid, though neither of them were Caliph at the time of his death. According to Tabatabai, however, al-Hadi was poisoned in the intrigue of Al-Mu'tazz who was caliph at the time. Most reliable sources say that al-Hadi died in 868. Al-Mu'tazz sent his brother abu Ahmad to lead the funeral prayer. However, because of the large crowd of people who came to the funeral and due to the crying and tumult, his corpse was returned to his house and was buried in its courtyard.
The tomb of al-Hadi which became also the tomb of his son Hasan al-Askari afterwards, is an important place of Shiite pilgrimage. It was bombed in February 2006 and badly damaged. Another attack was executed on 13 June 2007, which led to the destruction of the two minarets of the shrine. Authorities in Iraq said Al Qaeda was responsible for the attack.
Al-Hadi's son Abū Jafar Muhammad, is said to had died before his father in Samarra. His other sons were Hasan and Ja'far, from whom Hasan became the next Imam. According to some sources and pedigrees belonged to Naqvis, however, four more sons namely Hussain, Abdullah, Zaid, and Mussa are attributed to the tenth Imam.
Besides Hassan Askari, three sons (i) Hussain (ii) Muhammad (iii) Jafar and one daughter “Ailia” from different wives have been mentioned by various biographic scholars, including Shaikh Mufeed. Issues of these sons are traceable in different pedigree books published by researchers from time to time.