Short answer
Sihr is magic worked through spells, knots and hidden means with the help of devils from the jinn, to harm or control people. Mainstream Sunni scholars, the Hanafis among them, hold that it is real and can cause actual harm, but only by Allah's permission. Practising it is one of the destructive major sins, and it can never override Allah's decree.
Sihr has a real effect, as Sunni creed and the Hanafi texts affirm, and learning or practising it is haram. When it involves words or acts of disbelief, as it usually does, it is kufr. A Muslim does not fear it more than Allah, and protects himself with the Quran and the adhkar.
The four schools agree on this.
Explanation
In Arabic, sihr means anything whose cause is hidden. In the Shariah it is magic worked through spells, knots that are blown on, objects, and the help of devils from the jinn. The Quran says the devils disbelieved by teaching people magic, that people learned from it what separates a husband and wife, and that they harm no one through it except by Allah's permission (2:102). Surah al-Falaq teaches us to seek refuge from the blowers in knots.
The Prophet ﷺ was himself affected by magic made by a man named Labid ibn al-A'sam. He made dua again and again, and Allah showed him in a dream where the magic was hidden and cured him. This did not touch his message: it affected him the way an illness does, and it shows that even the best of people can be tested by it.
What sihr can and cannot do:
- Sihr can cause real harm, such as illness, confusion or hatred between spouses.
- It cannot change the nature of things or override Allah's decree. Pharaoh's magicians only bewitched the eyes of the people (7:116).
- It has no power over those Allah protects, which is why the Quran and the adhkar are the shield against it.
The relied-upon position of the Hanafi school, and of the four schools, is that magic has real effects. A few, such as the Mu'tazila and the Hanafi jurist Abu Bakr al-Jassas, held that most magic is illusion and trickery, but that is not the mainstream view. The Prophet ﷺ named sorcery second among the seven destructive sins, right after shirk.
For the ruling on magic and magicians, see is magic haram. For symptoms, see the signs of black magic, and for protection, Jinn in Islam.
The evidence
Quran, Surah Al-Baqara 2:102
وَٱتَّبَعُوا۟ مَا تَتْلُوا۟ ٱلشَّيَٰطِينُ عَلَىٰ مُلْكِ سُلَيْمَٰنَ ۖ وَمَا كَفَرَ سُلَيْمَٰنُ وَلَٰكِنَّ ٱلشَّيَٰطِينَ كَفَرُوا۟ يُعَلِّمُونَ ٱلنَّاسَ ٱلسِّحْرَ وَمَآ أُنزِلَ عَلَى ٱلْمَلَكَيْنِ بِبَابِلَ هَٰرُوتَ وَمَٰرُوتَ ۚ وَمَا يُعَلِّمَانِ مِنْ أَحَدٍ حَتَّىٰ يَقُولَآ إِنَّمَا نَحْنُ فِتْنَةٌۭ فَلَا تَكْفُرْ ۖ فَيَتَعَلَّمُونَ مِنْهُمَا مَا يُفَرِّقُونَ بِهِۦ بَيْنَ ٱلْمَرْءِ وَزَوْجِهِۦ ۚ وَمَا هُم بِضَآرِّينَ بِهِۦ مِنْ أَحَدٍ إِلَّا بِإِذْنِ ٱللَّهِ ۚ وَيَتَعَلَّمُونَ مَا يَضُرُّهُمْ وَلَا يَنفَعُهُمْ ۚ وَلَقَدْ عَلِمُوا۟ لَمَنِ ٱشْتَرَىٰهُ مَا لَهُۥ فِى ٱلْءَاخِرَةِ مِنْ خَلَٰقٍۢ ۚ وَلَبِئْسَ مَا شَرَوْا۟ بِهِۦٓ أَنفُسَهُمْ ۚ لَوْ كَانُوا۟ يَعْلَمُونَ ﴿١٠٢﴾
And they followed [instead] what the devils had recited during the reign of Solomon. It was not Solomon who disbelieved, but the devils disbelieved, teaching people magic and that which was revealed to the two angels at Babylon, Harut and Marut. But the two angels do not teach anyone unless they say, "We are a trial, so do not disbelieve [by practicing magic]." And [yet] they learn from them that by which they cause separation between a man and his wife. But they do not harm anyone through it except by permission of Allah. And the people learn what harms them and does not benefit them. But the Children of Israel certainly knew that whoever purchased the magic would not have in the Hereafter any share. And wretched is that for which they sold themselves, if they only knew.
Magic is taught by the devils and harms only by Allah's permission.
Quran, Surah Al-Falaq 113:4
وَمِن شَرِّ ٱلنَّفَّٰثَٰتِ فِى ٱلْعُقَدِ ﴿٤﴾
And from the evil of the blowers in knots
Allah commands us to seek refuge from those who blow on knots, which is magic.
Quran, Surah Al-A'raaf 7:116
قَالَ أَلْقُوا۟ ۖ فَلَمَّآ أَلْقَوْا۟ سَحَرُوٓا۟ أَعْيُنَ ٱلنَّاسِ وَٱسْتَرْهَبُوهُمْ وَجَآءُو بِسِحْرٍ عَظِيمٍۢ ﴿١١٦﴾
He said, "Throw," and when they threw, they bewitched the eyes of the people and struck terror into them, and they presented a great [feat of] magic.
Pharaoh's magicians affected people's perception, not the reality of things.
Sahih al-Bukhari 2766
Sahih... اجتنبوا السبع الموبقات قالوا يا رسول الله وما هن قال الشرك بالله والسحر ...
"Avoid the seven destroyers. They asked, Messenger of Allah, what are they? He said: associating partners with Allah, and sorcery..."
Magic is one of the gravest major sins.
Sahih al-Bukhari 5763
Sahih... أشعرت أن الله أفتاني فيما استفتيته فيه ...
"Did you know that Allah has answered me about what I asked Him?"
He told Aishah that Allah had shown him the cause of the magic after his dua.
Where the ruling is recorded
- al-Durr al-Mukhtar, Muqaddimah, on knowledge that is forbidden to learn. Counts sihr among forbidden fields of knowledge.
- Umdat al-Qari (al-Ayni), Kitab al-Tibb, Bab al-Sihr. Affirms the reality of magic in explaining the hadith of Labid ibn al-A'sam.
- Ahkam al-Quran (al-Jassas), Commentary on Surah al-Baqarah 2:102. The minority Hanafi view that most magic is illusion.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.