Al-Mutawakkil prevented ulama, jurisprudents, and narrators from meeting him, enjoying his knowledge and narrating his fatwas and opinions. Doing this, al-Mutawakkil committed a terrible crime against knowledge. He imposed economic blockade against the Imam and prevented people from taking the legal dues, which came from different Islamic countries, to him. He left the Imam in a pressing neediness. The caliph ordered his men to search the house of the Imam from time to time that they might find arms or books objecting to the Abbasid rule so that al-Mutawakkil might find an excuse to kill the Imam but nothing was found.
Sometimes, he ordered his men to bring him the Imam in whatever state he was. Once, the Imam was brought while al-Mutawakkil was drunk and before him there were vessels and cups of wine and he was surrounded by groups of male and female singers, but the Imam was sharp with him and began advising him, reminding him of the afterlife, and scolding him for the corruption he was in. When al-Mutawakkil saw the Imam insist on keeping away from him, refuse to associate with him, and devote himself to Allah, he ordered his men to arrest and put him into prison.
After the death of al-Mutawakkil, the distress of Imam al-Hadi (AS) did not end. The Abbasid government kept on watching him and plotting day and night to do away with him. They bore malice towards him because he was highly regarded and sanctified by all the nation, whereas the Abbasids got no respect or regard like that. Besides that, there was a big part of the nation believing in the Imamate of Imam al-Hadi (AS) and believing that he was worthier of the Islamic caliphate than the Abbasids who indulged in pleasures and lusts and governed the nation, like the Umayyads, with violence, oppression, and haughtiness.
Imam al-Hadi (AS) became a heavy burden on al-Mu'tamid the Abbasid caliph after he saw people talk about the virtues, knowledge, asceticism, and piety of the Imam and prefer him to all other Muslim scholars. He became angry, envious, and spiteful against the Imam. His ill will led him to commit the worst crime in Islam. He inserted fatal poison to the Imam, who, after having the poison, kept to bed. The poison reacted in all his body and he suffered intolerable pains. The Shia and the notables of the state visited him in deep sorrow.
Imam al-Hadi (AS) appointed his son Abu Muhammad al-Hassan (al-Askari) as the Imam after him and set him as the general authority for the Shia after his death. He insinuated to his close companions about the Imamate of his son Abu Muhammad (AS) before. Imam al-Hadi (AS) entrusted his son Imam al-Hassan al-Askari (AS) with the procedures of funerals, prayer, and burial after his death, and recommended him of other recommendations concerning his affairs.
Samarra' was shocked by the great disaster. People of all classes hurried to get the honor of escorting the pure body of the great Imam who was the remainder of prophethood and Imamate. State offices and shops were closed. Viziers, scholars, judges, prominent leaders of the army, and the eminent members of the Abbasid family walked before the bier feeling the big disaster, and mentioning the virtues and favors of the Imam, and expressing the great loss that afflicted the Islamic nation. Splendid funerals were held that Samarra had never seen like before.
The pure corpse was carried under a halo of takbir and glorification to the last abode of the Imam (AS) that was his house which he had assigned to be a graveyard for him and his family. Imam al-Hassan al-Askari (AS) put the pure corpse of his father into the tomb, while his tears were flowing over his cheeks. He buried with his father the values of knowledge, patience, piety, and probity.
After the burial, the masses of people came to Imam al-Hassan al-Askari (AS) and comforted him, while he was standing with his family to thank the comforters.
Imam al-Hadi (AS) was martyred on Monday, the twenty-fifth of Jumadi al-Thani in 254 AH when he was forty years old. Other than this date is also mentioned in some sourcebooks.