Imam al-Shafi'i (may Allah have mercy on him) said: "Allah Almighty says: 'And whoever is killed unjustly, We have certainly given his heir authority (for retaliation)' [Surah al-Isra': 33].
And the Messenger of Allah (peace and blessings be upon him) said, concerning the things by which a Muslim's blood becomes lawful: 'and killing a soul without right.'
And it is narrated from the Messenger of Allah (peace and blessings be upon him): 'Whoever kills a Muslim without cause (unjustly), retaliation (shall be taken) for what his hand did.'"
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قتال أهل البغي / Q16759
Ja'far bin Muhammad narrates from his father that Sayyiduna Ali (may Allah be pleased with him) said concerning Ibn Muljam (after he had struck him): Feed him and give him drink, and keep him well as a captive. If I survive, I am the guardian of my own blood: if I wish I will pardon, and if I wish I will take retaliation. And if I do not survive and you kill him, do not mutilate him (muthlah).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قتال أهل البغي / 16759