Magic is another major sins which is haram (impermissible) in all its forms. Magicians practicing sorcery have certain features and signs that prove that they are obeying and worshipping the devils (shayaateen) and are in league with them. The ruling of magic (witchcraft, sorcery) is that it is disbelief (kufr) and anyone indulging in it is a kafir (disbeliever). There is no such thing as “good” magic. All magic (sihr) is haraam.
Also, the view of scholars is that the one who used magic to kill another is a murder and should be executed by the authorities if he killed the person by means of a kind of magic that usually kills.
Allah says (interpretation of the meaning):َ
“They followed what the Shayateen (devils) gave out (falsely of the magic) in the lifetime of Sulaiman (Solomon). Sulaiman did not disbelieve, but the Shayatin (devils) disbelieved, teaching men magic and such things that came down at Babylon to the two angels, Harut and Marut, but neither of these two (angels) taught anyone (such things) till they had said, “We are only for trial, so disbelieve not (by learning this magic from us).”
And from these (angels) people learn that by which they cause separation between man and his wife, but they could not thus harm anyone except by Allah’s Leave. And they learn that which harms them and profits them not. And indeed they knew that the buyers of it (magic) would have no share in the Hereafter. And how bad indeed was that for which they sold their ownselves, if they but knew.!” (Baqarah : 102)
… Abide by the truth even if your mind deserts you.