Here's the basis why magic is absolutely haram:
The Prophet (peace and blessings be upon him) said, “Whoever blows on knots practices magic, and whoever practices magic is a mushrik (polytheist).” (Reported by At-Tabarani)
`Abdullah ibn Mas`ud reported, “Anyone who goes to a diviner, a practitioner of magic or a soothsayer, asking something and believing in what he says, denies what was revealed to Muhammad.” (Reported by Al-Bazzar and Abu Ya`la)
"And they followed what the Shaitans chanted of sorcery in the reign of Sulaiman, and Sulaiman was not an unbeliever, but the Shaitans disbelieved, they taught men sorcery and that was sent down to the two angels at Babel, Harut and Marut, yet these two taught no man until they had said, "Surely we are only a trial, therefore do not be a disbeliever." Even then men learned from these two, magic by which they might cause a separation between a man and his wife; and they cannot hurt with it any one except with Allah’s permission, and they learned what harmed them and did not profit them, and certainly they know that he who bought it should have no share of good in the hereafter and evil was the price for which they sold their souls, had they but known this.” (Al-Baqarah: 102 )
"Say: I seek refuge in the Lord of the dawn. From the evil of what He has created. And from the evil of the utterly dark night when it comes. And from the evil of those who blow on knots. And from the evil of the envious when he envies.” (Al-Falaq: 1-5)
“Those who swallow down usury cannot arise except as one whom Shaitan has prostrated by (his) touch does rise. That is because they say, trading is only like usury; and Allah has allowed trading and forbidden usury. To whomsoever then the admonition has come from his Lord, then he desists, he shall have what has already passed, and his affair is in the hands of Allah; and whoever returns (to it)-- these are the inmates of the fire; they shall abide in it.” (Al-Baqarah: 275)
"Verily whoever sets up partners with Allah, then Allah has forbidden Paradise for him and the fire will be his abode. And for the Zalimun (Polytheists, and wrongdoers) there are no helpers." (QS. Al-Maaidah 5:72)
“The hadd (prescribed punishment) for the practitioner of magic is a blow with the sword (i.e., execution).” (Narrated by al-Tirmidhi, 1460; al-Daaraqutni, 3/114; al-Haakim, 4/360; al-Bayhaqi, 8/136; see al-Silsilah al-Da’eefah, 3/641, no. 1446 Muslim narrated in his Saheeh that the Prophet (peace and blessings of Allaah be upon him) said: “Whoever goes to a fortune-teller and asks him about something, his prayer will not be accepted for forty days.”
And it was narrated from Abu Hurayrah (may Allaah be pleased with him) that the Prophet (peace and blessings of Allaah be upon him) said: “Whoever goes to a soothsayer and believes what he says has disbelieved in that which was revealed to Muhammad (peace and blessings of Allaah be upon him).” Narrated by Abu Dawood and by the four authors of al-Sunan;
classed as saheeh by al-Haakim who narrated that the Prophet (peace and blessings of Allaah be upon him) said: “Whoever goes to a fortune-teller or soothsayer and believes what he says has disbelieved in that which was revealed to Muhammad (peace and blessings of Allaah be upon him).”
And it was narrated that ‘Imraan ibn Husayn (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “He does not belong to us who observes bird omens or has that done for him, or who seeks divination or who has that done for him, or who practices witchcraft or has that done for him. Whoever goes to a soothsayer and believes what he says has disbelieved in that which was revealed to Muhammad (peace and blessings of Allaah be upon him).” Narrated by al-Bazzaar with a jayyid isnaad.