Allah Almighty says: {It was not Solomon who disbelieved, but the devils disbelieved, teaching people magic.} [Surat al-Baqarah: 102]
1793 - Abu Hurayrah (may Allah be pleased with him) reported that the Prophet (may Allah’s peace and blessings be upon him) said: “Avoid the seven destructive sins.” They said: “O Messenger of Allah, what are they?” He said: “Associating partners with Allah; magic; killing a person whom Allah has made inviolable, unless it is legally justified; consuming usury; devouring the orphan’s wealth; fleeing from the battlefield; and slandering chaste, believing, and oblivious women.” [Narrated by Al-Bukhāri and Muslim]
--
1) Magic is a major sin and a path leading to disbelief. A magician does not master his magic unless he becomes a disbeliever.
2) Associating partners with Allah is coupled with magic in the Hadīth, which points out the relationship between the two and the grave sin of those who engage in magic.