Principle
Under the Law of Moses, God forbid witchcraft including sorcery, divination, soothsaying, interpreters of omens, spell-casting, and mediums who call up the dead.
Explanation
GOD spoke through Moses, saying:
9 “Now if you enter the land the Lord your God gives you, you shall not learn to do the abominations of those nations. 10 There shall not be found among you anyone who purifies his son or daughter in the fire, or one who practices divination, or a soothsayer, or one who interprets omens, or a sorcerer, 11 or one who conjures spells, or a medium, or a spiritist, or one who calls up the dead. 12 For all who do these things are an abomination to the Lord your God, and because of these abominations the Lord your God will destroy them before you. 13 You shall be perfect before the Lord your God. 14 For all these nations which you will dispossess listened to soothsayers and diviners; but as for you, the Lord your God has not appointed such for you.
(Deuteronomy 18:9-14 OSB)
And elsewhere:
19:26 ‘You shall not eat upon the mountains, nor divine for omens, nor watch birds for omens. ... 31 You shall not follow ventriloquists, nor attach yourselves to enchanters, to be defiled by them: I am the Lord your God.
...
20:6 Also the soul who follows ventriloquists and charmers, to prostitute himself with them, I will set My face against that soul and destroy him from among his people.
(Leviticus 19:26, 31; 20:6 OSB)
In Scripture, practices associated with witchcraft are closely tied to those regarding idolatry and worship of other gods—the ruling angels of the second world.
For example, observe the context of the previously-cited Leviticus 20:6:
1 Now the Lord spoke to Moses, saying, 2 “Again, you shall say to the children of Israel, ‘Whoever of the children of Israel, or of the resident aliens dwelling in Israel, gives any of his children to worship a ruler, let him be put to death. The people of the land shall stone him with stones. 3 I will set My face against that man and will destroy him from among his people, because he gave his children to a ruler, to defile My holy things and profane the name of those sanctified for Me. 4 But if the natives of the land disregard that man, taking no notice of him when he gives his children to a ruler, and they do not kill him, 5 then I will set My face against that man and those of his kind. For since he and those in agreement with him prostituted themselves to rulers, I will destroy them from among their people. 6 Also the soul who follows ventriloquists and charmers, to prostitute himself with them, I will set My face against that soul and destroy him from among his people. 7 Therefore, you shall be holy, for I the Lord your God am holy. 8 You shall keep My ordinances and perform them: I am the Lord who sanctifies you. 9 Whatever man curses his father or mother shall surely be put to death. He cursed his father or mother. Thus he shall be guilty.
(Leviticus 20:1-9 OSB)
In the Hebrew Masoretic Text, the word "ruler" in this passage is translated Molech, a specific god of the Canaanites commonly associated with child sacrifice, even to today:
1 Then the Lord spoke to Moses, saying, 2 “Again, you shall say to the children of Israel: ‘Whoever of the children of Israel, or of the strangers who dwell in Israel, who gives any of his descendants to Molech, he shall surely be put to death. The people of the land shall stone him with stones. 3 I will set My face against that man, and will cut him off from his people, because he has given some of his descendants to Molech, to defile My sanctuary and profane My holy name. 4 And if the people of the land should in any way hide their eyes from the man, when he gives some of his descendants to Molech, and they do not kill him, 5 then I will set My face against that man and against his family; and I will cut him off from his people, and all who prostitute themselves with him to commit harlotry with Molech.
6 ‘And the person who turns to mediums and familiar spirits, to prostitute himself with them, I will set My face against that person and cut him off from his people. 7 Consecrate yourselves therefore, and be holy, for I am the Lord your God. 8 And you shall keep My statutes, and perform them: I am the Lord who sanctifies you.
9 ‘For everyone who curses his father or his mother shall surely be put to death. He has cursed his father or his mother. His blood shall be upon him.
(Leviticus 20:1-9 NKJV)