The Menorat Ha’maor brings two approaches to explaining the Torah prohibition of "Lo Te’onenu." One explanation of the word "Te’onenu" is that it relates to the word "Ona," or "time period," and thus this prohibition forbids making decisions based on astrological occasions. For example, one may not determine that a certain day is an auspicious or inauspicious time for starting a business or embarking on a trip, for no rational reason (such as on the Friday the 13th). Additionally, however, the word "Te’onenu" is a derivative of the word "Ayin" – "eye." According to this interpretation, the command of "Lo Te’onenu" forbids deceiving people by performing magical acts.
Different views exist as to what precisely constitutes a forbidden act of magic. According to some Halachic authorities, magic is forbidden only if one actually employs the forces of witchcraft, meaning if he actually transforms objects or performs supernatural acts by summoning various powers that exist in the world.
The Rambam (Rav Moshe Maimonides, Spain-Egypt, 1135-1203), however, presents a different view. In his Sefer Ha’misvot (Lo Ta’aseh 32; listen to audio recording for precise citation), he writes that "Lo Te’onenu" forbids even magical acts performed by the sleight of hand. Even though the performer does not employ any magical forces, but simply has the skill to make it appear as though he performs supernatural acts, he violates this prohibition. The Rambam gives the examples of appearing to pull a snake out of somebody’s pocket, or pulling a ring from somebody’s mouth. According to the Rambam, such acts violate the Torah prohibition of "Lo Te’onenu."
In light of this ruling, it would seem that contemporary magic shows are strictly forbidden. Even though magicians clearly perform their tricks through skill and training, and do not invoke any sort of magical powers, such tricks nevertheless fall under the prohibition of "Lo Te’anenu." Hacham Ovadia Yosef, in two separate contexts (Yehaveh Da’at 3:69; Yabia Omer, vol. 4), writes that this would be forbidden even for the purpose of Simhat Hatan Ve’kalla (celebrating with a bride and groom), such as in the case of a magician hired to perform at a wedding or Sheba Berachot. The fact that the entertainment is being provided for the sake of a Misva does not override the Torah prohibition of "Lo Te’onenu." Moreover, the one who hires a magician violates the prohibition of "Lifneh Iver Lo Titen Michshol" – causing another person to sin, by summoning somebody to violate "Lo Te’onenu." And, the members of the audience who cheer and encourage the magician would be in violation of "Mesaye’a Li’dbar Abera" – abetting sinners. This is also the ruling of the Hayeh Adam (Rav Abraham Danzig of Vilna, 1748-1820). The exception would be a non-Jewish magician, who would be allowed to be invited to perform. Gentiles are not included in the prohibition of "Lo Te’onenu," and they are thus permitted to perform magic tricks. As such, a Jew would be allowed to hire him and watch his shows. But as far as Jews are concerned, it would appear that magic shows are forbidden.
Rav Moshe Feinstein (Russia-New York, 1895-1986), however, in his Iggerot Moshe (Yoreh De’a 4:13), writes that there is room for leniency in this regard. He raises the question of why magic tricks should be different from any other talent that one develops. For example, the Midrash speaks of Naftali’s extraordinary running talent, how he was able to quickly run from Eretz Yisrael to Egypt and then back to Eretz Yisrael in a very short period of time. This talent could be described as "magic," yet certainly it was permissible. Shimshon’s remarkable strength was also "magical" in the sense that it was extraordinary, yet his acts of strength were certainly allowed. It would appear that a magician with an exceptional talent involving the sleight of hand is no different from anybody else with a special talent, and this should not be forbidden. Rav Moshe thus proposes that the Rambam forbade magic tricks only if the magician tries deceiving the audience by having them think that he uses magical powers. Accordingly, if the magician makes it clear from the outset that he performs his tricks through the sleight of hand, and not through some supernatural powers, then it would be permissible. Rav Moshe writes that although nobody ever posed this question to him, if he were asked this question, this would be his response – that a magic show is permissible if the magician makes it clear that he does not utilize any kind of supernatural force. Hacham Ovadia Yosef mentions this leniency of informing the audience that no magical powers are being used. Thus, there is room to allow magic shows, but if the magician is Jewish, he must make an announcement from the outset clarifying that his tricks are performed through the sleight of hand, and not through actual magical powers.
Summary: It is permissible for a Jew to perform magic tricks, provided that he makes it clear to the audience that he performs them through the sleight of hand and not through actual magical powers.