Question:
It says in the Qur’an “an eye for an eye.” So if someone has killed a member of your family, can you kill him?Or will this be committing a sin because it also says in the Qur’an you should not take another’s life?In Islam, is it OK to punish someone who has committed black magic against you?

Answer
“An eye for an eye” is part of a Quranic verse that mentions the law that God had revealed in the Torah:
*{And We ordained for them in that [Torah]: A life for a life, and an eye for an eye, and a nose for a nose, and an ear for an ear, and a tooth for a tooth, and a [similar] retribution for wounds}*  (Al-Maidah 5:45)
This is a verse. However, it is incorrect for an individual Muslim to take an action related to a legal matter only based on one evidence (such as a verse from the Quran or a hadith of the Prophet — peace be upon him). An action cannot be decided unless all verses and hadiths related to the topic are put in one context.
Generally speaking, if we put all the scripts related to punishments for crimes, in other words, Islamic criminal law, we will learn the following guidelines:
1. Criminal rulings are to be applied by a government and never by individuals. If we leave it up to individuals to apply the Islamic law, society will become chaotic. Thus, it is prohibited for an individual Muslim to apply such laws on his or her own, even if the government falls short in applying such laws, from that individual’s point of view.
2. The application of punishments in the Islamic law is always subject to a long list of conditions before this punishment is applied. A judge cannot have a shadow of doubt as he or she sentences a suspect with a punishment. That is why circumstantial evidences are not enough in cases of murder and similar major offences that fall under punishments.
3. The punishment that is prescribed in the Quran, which scholars call a hadd, is usually a maximum sentence that a judge could use if the circumstances of the crime dictate that. Lighter punishments could also apply depending on several factors, such as the specific situation of the crime, a state of war that the whole community is going through, etc.
4. In the specific case of murder, there is room in Islamic law for the relatives of the murdered to pardon the murderer and agree on certain compensation. These provisions are subject to societies and traditions, which could also take the shape of written laws.
Therefore, the answer is yes: You will be committing a major sin if you take the “eye for an eye” law into your own hands. You wrote in your question form that you live in the United Kingdom, which is a country where there is rule of law. Thus, if you accuse someone of murder of a relative of yours, follow all the possible legal means in order to get the murderer punished according to whatever punishment that the law of the land prescribes. It is prohibited to take such matters in your own hands.
Regarding the other part of your question related to black magic: I do not know what you mean by “black magic”, brother. I am not sure how you define that and how you know if someone had practiced it on you!
“Magic,” “soothsaying,” and Jinn-related stuff are, unfortunately, common practices in some Muslim countries. These are practices that have only brought Islam and Muslims a bad name.
It is true that these matters are mentioned in one context or the other in the Quran. However, the Quran instructed us on how to deal with these matters, which is to believe that no harm could even happen to you except by God’s permission.
*{ They followed [instead] that which the evil ones used to practice during Solomon’s reign – for it was not Solomon who denied the truth, but those evil ones denied it by teaching people sorcery -; and [they follow] that which has come down through the two angels in Babylon, Harut and Marut-although these two never taught it to anyone without first declaring, “We are but a temptation to evil: do not, then, deny [God’s] truth!” And they learn from these two how to create discord between a man and his wife; but whereas they can harm none thereby save by God’s permission, they acquire a knowledge that only harms themselves and does not benefit them – although they know; indeed, that he who acquires this [knowledge] shall have no share in the good of the life to come. For, vile indeed is that [art] for which they have sold their own selves -had they but known it!}* (Al-Baqarah 2:102)
Mohammad Asad, the author of The Message of the Quran, commented on his translation of the word “sorcery” by saying:
The above passage does not raise the question as to whether there is an objective truth in the occult phenomena loosely described as “magic,” or whether they are based on self-deception. (p.30)
But the effect of “magic” being a matter of “deception” is stated clearly in the Quran in another context that described the works of Pharaoh’s sorcerers as “striking people with awe” rather than something that has any objective nature.
*{And the sorcerers came unto Pharaoh [and] said, “Verily, we ought to have a great reward” if it is we who prevail. Answered [Pharaoh], “Yes; and, verily, you shall be among those who are near unto me. They said, “O Moses, either you shall throw [your staff first], or we shall [be the first to] throw. He answered, “You throw [first].” And when they threw down [their staffs], they cast a spell upon the people’s eyes and struck them with awe and produced mighty sorcery.}* (Al-Araf 7: 113-116)
So, there is no real objective nature for this “magic;” rather, it is a matter of deception. And the “hadith” that narrates that the Prophet was influenced by magic is void and not credible because it contradicts with the clear Quranic statements that confirm that the Prophet is under no influence of “magic” as the disbelievers claimed.
Therefore, I would advise you, brother, to seek refuge in God from any evil (whether real or perceived) and rely on Him, and simply ignore those who claim to have harmed you through their tricks of deception. No one could harm you if God protects you.
I hope this answers your question. If you have further questions, please do not hesitate to write to us again.
Salam.

=====

Source: www.onislam.net — Ask about Islam — Jasser Auda.