In was Ramaďan, 19th 40 A.H. at dawn when Imam was preparing to head for Siffin to battle once again with Mu'awiya but he was wounded by the most black-hearted man in the world named 'Abd al-Rahman Ibn Muljam Muradi and martyred three days later on Ramaďan 21st.
As reported by Ibn Sa'd, three Kharijites called 'Abd al-Rahman Ibn Muljam, Burak Ibn 'Abd Allah Tamimi and 'Amr Ibn Bukayr Tamimi allied in Mecca to kill Imam 'Ali (a), Mu'awiya and 'Amr Ibn 'As.
To visit his Kharijites' friends, 'Abd al-Rahman went to Kufa. Once he went to meet a group from the tribe of “Taym al-Rabbab”, he saw a girl called Qutam Bnt Shajanna Ibn 'Adi whose father and brothers had been killed in Nahrawan. When Ibn Muljam proposed to her, she declared that her marriage portion should be 3000 (Dinar
in addition to Imam 'Ali's murder. He told that by accident with this very aim he had traveled to Kufa. 
He smeared his sword with poison and attacked Imam on the head. The deepness of the wound as well as the poison of the sword martyred Imam. Reportedly, Ibn Muljam had been in Ash'ath Ibn Qays's house that night. 
Various narrations indicate that Imam was attacked by Ibn Muljam inside the mosque.  In accordance to other ones, he attacked Imam while he was waking people up for prayer.  Many historical sources have referred to the former although many reports recorded say Imam was attacked while doing prayer.
Maytham Tammar had reported that Imam had started his Dawn Prayer and no sooner had he recited eleven verses of the Sura of “the Prophets” than Ibn Muljam wounded Imam on the head.  As narrated by one of Ju'da Ibn Hubayra's descendants, Imam was wounded while doing his prayer. 
The man above-mentioned, Ju'da, had been Umm Hani's son who every so often had led the prayers as a substitute leader and narratedly he had been the one who completed the prayer when Imam was attacked. Shiykh Tusi has also confirmed the aforesaid narration.  Yet, Muttaqi Hindi's report had been that Ibn Muljam had hit Imam when Imam was prostrating back. 
Ibn Hanbal  together with Ibn 'Asakir  has confirmed the report. Ibn 'Abd al-Barr stated that there had been no consensus on whether Imam was attacked while doing the prayer or before it and whether any one substituted him or he himself led the prayer to the end. Many are of the opinion that Imam had Ju'da Ibn Hubayra lead the incomplete prayer. 
A great number of hadiths have been narrated by the Holy Prophet's Household and the Sunnis concerning how Imam felt during the night before being wounded. Ibn Abi l-Dunya quoted Imam al-Baqir (a) as saying that Imam had been fully aware of his martyrdom.  As soon as being injured, Imam shouted out, فزت ورب الكعبة “By Allah of Ka'ba, to salvation I reached.” 
Ibn Abi l-Dunya has narrated Imam's will in different ways which included both financial and religious issues. The salient issues recommended by Imam were as follows: Observation of kinship, heed to the orphans and the neighbors, following the guidelines of the Holy Qur’an, performing prayers as the pillar of the religion, Hajj, fasting, Jihad, Zakat (tax alms) following the Holy Prophet’s infallible Household, serving Allah’s servants, enjoining to good and forbidding from evil.
Reportedly, on Ramaďan 21st, while Imam was whispering, لااله الا الله “There is no God but Allah” and the verse of, فمن يعمل مثقال ذرة خيراً يره ومن يعمل مثقال ذرة شراً يره “So he who has done an atom’s weight of good shall see it. And he who had done an atom’s weight of evil shall see it” Breathed his last. 
According to another narration, after Imam's martyrdom, Imam Hasan (a) and Imam Husayn (a), Muhammad Ibn Hanafiyya, 'Abd Allah Ibn Ja’far as well as few numbers from the household took Imam (a) out of Kufa nightly and hiddenly from sight buried him. It was because the Kharijites and the Umayyads might exhume Imam. 
Upon hearing the news of Imam 'Ali's martyrdom, a group of the Exaggerators in Ctesiphon did never believe their ears. This group is the initiator of the exaggerating thoughts among the Shi'ite Muslims whom we will address later. Ibn Abi l-Dunya's report in this respect referred to a person named Ibn as-Sawda' from the tribe of Hamdan know as 'Abd Allah Ibn Saba'.
Elsewhere, the name of 'Abd Allah Ibn Wahb as-Saba'i, was mentioned and that such a claim had been made in Ctesiphon.  Both narrations reveal that the person had even been anonymous. See also 'Uthman's Opponents.
Imam ‘Ali’s Life
The analysis of Imam's lifestyle as a paragon seems beyond the possibility here; yet, we refer to some aspects for luck in brief.
Imam's political and social life is so exemplary that it can be deemed utopian. At times, so uniquely firm was he regarding divine decrees that not a single one could ever emulate him as he himself had pointed to it in a letter. 
For those yearning to be faithful to it, his lifestyle is a perfect pattern. Every time we can learn from it but the way is still too long to go. In other wards, Imam's lifestyle has been the best during man's life. It belongs to a perfect man who can indeed be called human and Allah's successor on the earth. Such an engrossing life did he have that it had his friends reach the zenith of amity and his enemies reach the zenith of enmity in front of him.
In this regard, the Prophet (S) has stated:
يهلك فيك الرجلان محب مفرط ومبغض مفرط
His withstanding for the sake of the path of Truth does incense the enemy that it makes him go to extremes whereas it does fan the blames of his friend's love that he may go to extremes. 
The one feeling affection for him can ascend as highly as the rank to be called a devoted Shi'ite Muslim but if he neglected slightly he would be affected by the exaggerating tendency. Rarely ever has it be seen that divinity be attributed to a person. 'Ali (a), however, in a community where Allah had underscored the humanity of the prophet Muhammad (S) was targeted by such attribution although Imam opposed it severely.
Imam's asceticism is what overshadowed all his life. He was an ascetic man who turned back on anything though he was entitled to possess everything. A group asked about the most ascetic man in the presence of 'Umar Ibn 'Abd al-'Aziz. Some named Abudhar and 'Umar but 'Umar Ibn 'Abd al-'Aziz said:
أزهد الناس علي بن ابيطالب (ع
“No one is the most ascetic but 'Ali Ibn Abi Talib.” 
Imam not only associated with the poor but also behaved kindly towards them.  He was sometimes seen doing prayer or delivering a sermon wearing his one and the only shirt wet.104 Repeatedly, Imam has referred to his simple life in Nahj al-Balagha. Noticing that Imam ate very frugal food, one of his disciples told him, أبالعراق تصنع هذا؟ العراق أكثر خيراً وأكثر طعاماً … “Do you eat such food in Iraq where the best food can he found?” 
Imam was the first one who practiced what he peached objecting to 'Uthman Ibn Hunayf in Nahj al-Balagha or in his public sermons concerning this worldly life.
Aswad Ibn Qays recounted that Imam 'Ali (a) fed the Kufiyans on the fertile land of the mosque but he himself ate the food in his house.
One of his disciples said, “I said to myself that 'Ali eats more delicious food at home than what he gives people. So I left my food half eaten and followed him. He called Fiďďa and asked her to prepare the food. She brought a loaf of bread and yogurt diluted with water. He dipped the pieces of bread in the liquid while it was with bran. I asked him why he had not asked for bread baked with flour without bran. Shedding tears, he answered, “By Allah, neverever bread without bran was found in the Prophet's house.” 
'Uqba Ibn 'Alqama narrated,”When I met Imam 'Ali (a), there was sour yogurt diluted with water in front of him that was so sour and watery that it upset me. I asked him whether he would eat it.O Aba l-Khabub, worse than this was the prophet's food and rougher than mine was his clothes.
Imam answered, “I fear if I did not do what he had done, I would never join him”.  When a special food was brought for Imam, Imam stated, “Never do I eat what the Prophet (S) had never eaten”. 
It does not imply that eating such food is unlawful but sheer act of following Allah's Messenger is of supreme importance for an Imam.
Presenting another example appears appropriate. As recounted by Abu l-Shiykh Ansari, born in 369, Imam appointed 'Amr Ibn Salama as the governor of Isfahan. When setting out for Kufa, 'Amr was intercepted by the Kharijites. With the tributes and the gifts, he had to settle in Hulwan. As soon as the Kharijites went away, he left the tributes in Hulwan and took the gifts with him to Kufa.
Imam ordered him to lay them on the fertile land by Kufa Mosque and then distribute among Muslims. Umm Kulthum, Imam's daughter, sent for 'Amr to send her some honey brought. He sent her two cans then.
When Imam came to the mosque for prayer, he realized that the honeys were two less. He called 'Amr and asked where the two others were. He answered, “Do not ask what happened”, then he went and brought two cans of honey and added to them.
Imam repeated,”I only wanted to know what happened to those two”.
“Umm Kulthum demanded to send honey to her”, answered 'Amr.
“Not have I told you to distribute the gifts among people?” Imam asked.
He sent for her to send the honey back. When brought back a little was consumed. He sent for the traders to estimate the price of the subtracted amount. It was three or so dhms. Imam sent for Umm Kulthum to pay for it. Then, the honey was distributed among Muslims. 
Numerous examples can be found in al-Gharat and other books.
It is Imam's own statement, أنا الذي أهنت الدنيا  “I am the one who despised this world.”
That manifests his stance against this worldly life. Imam's behavior towards the agents is another dimension of his life addressed in historical sources. From any point of view, Imam supervised his agents and during his short term, many letters were written by him reprimanding them. After 'Ali's martyrdom, Suda, 'Umara Hamdani's daughter, came up to Mu'awiya. She had participated in Siffin.
For a short while, Mu'awiya talked her about Siffin. She requested him to depose Busr Ibn Artat oppressing them. He declined, however. Suda consequently prostrated and an hour later rose up. Mu'awiya asked her what it was for.
She responded,”When I went to 'Ali to complain about the man responsible for our alms, he was busy with praying. After his prayer, he asked me what I wanted. On hearing with no delay he took a piece of skin out of his pocket and urging him to observe justice he wrote, “As soon as receiving the letter, do what ordered until I send one to replace you. He gave the letter to me to hand in him. He was deposed accordingly.” 
 Tabaqat al-Kubra, vol. 3, pp 35-38
 Maqtal al-imam Amir al-Mu‘minin, p. 36, No 13
 Ibid p. 29, No 4; p. 35, No 12
 Ibid pp 28,33, No 11
 Ibid p. 30, No 5
 Ibid p. 30, No 6
 al-Amali, al-Juz‘ al-thalith, No 18
 Kanz al-’Ummal, vol. XV, p. 170 (2nd edition); al-Amali fi Athar sahaba, pp 103-104
 al-Faďa’il, p. 38, No 63 (published in Qum
 Tarjamat al-imam ‘Ali Ibn Abi Talib (a), vol. III, p. 361 (2nd edition
 al-Isti‘ab (in the margin of al-Isaba), vol. III, p. 59
 al-Isti‘ab pp 33-34, No 12; Abu Nu‘aym along with many others have narrated that the Prophet had already foretold his martyrdom Ma‘rifat As-Sahaba, vol. I, pp 295-296
 Ibid p. 39, No 20; footnote, al-Imamah wa’l-Siyasah, p. 160, Ansab al-Ashraf, vol. II, p. 499
 Maqtal al-imam Amir al-Mu‘minin, pp 45-46
 Ibid p. 79, No 68
 Ibid p. 92, No 85; p. 96, No 91
 Nahj al-Balaghah, letter 45
 This Hadith is the one repeated many times Imam also stated, يهلك فيك الرجلان، محب مفرط ومبغض مفرط Two people are murdered for me, extremist friend and hardline foe Nahj al-Balaghah, sermon 127
 al-Mi‘yar wa l-muwazina, p. 240
 Ibid p. 240
 Ibid p. 244
 Ansab al-Ashraf, vol. II p. 187; al-Gharat, vol. I, pp 85,87,88
 al-Gharat, vol. I, p. 85
 Ibid pp 88-89; the footnotes of the same pages
 Tabaqat al-Muhaddithin bi-Isbahan, vol. I, Akhbar Isbahan, vol. I, p. 72
 Hayat As-Sahaba, vol. II, p. 310
 al-Futuh, vol. III, pp 90-92