A lot of magic in fiction requires the caster to have some metaphysical connection with magic—usually a soul—in order to use it. A robot capable of using magic, therefore, has enough of a Heart Drive to meet this requirement, according to some works.
For this to count, Clarke's Third Law should not be in effect (i.e. the magic shouldn't be some very highly advanced technology), and the character has to be explicitly robotic from inception (ergo cyborgs don't qualify for this trope).
Sub-Trope of Magitek, which is not limited to robots. Also a case of Ninja Pirate Robot Zombie, being a combination of two things we consider cool, and Oxymoronic Being and/or Paradox Person, due to technology and magic mixed together.
- In Eberron, Warforged can be wizards and psions, just as easily as their meatsack companions. This is accomplished with the use of special Power Crystals inserted during their Creation, so it's kinda hard for them to multiclass into a mage later. That said, specific character examples are hard to come by, and most of these characters are likely going to be PCs.
- Pathfinder: Androids — artificial humanoids with synthetic flesh and nanite fluid for blood, and who are created from Lost Technology automated factories rather than being born — can become arcane and occult spellcasters as easily as any natural race, and in fact tend to have keen interest in magic and spiritualism.
- In Promethean: The Created, the Unfleshed are a kind of Promethian (a pseudo-living creature usually created from human corpses subjected to a specific ritual) arisen from broken machines rather than dead people. These can still use magic-like Refinements, using the Divine Fire imbued into their beings, in an effort to cure their Pinocchio Syndrome.
- Bravely Second: The E-Type models of the Glanz Empire's Iron Man soldiers are partially built using magic charms and are capable of casting spells like Lightning, thanks to having magic stones inside them that allow them to do so.
- Chrono Trigger: Averted with Robo (a sentient robot found in the Bad Future). While his attacks are the only source of Shadow-element magic for the party unless you recruit Magus later on, they consist of laser attacks, and Speccio specifically says he has no soul, and therefore can't use magic.
- Destiny: Exo Warlocks would qualify for this trope.
- Dragalia Lost: Downplayed regarding Mega Man. He's classified as a wand user, who are known for magic-based combat, yet he utilizes his signature Mega Buster during gameplay rather being shown using whatever wand he has equipped, and his special moves are also weapons from his games. He is able to use special moves that are part of the wand he equips just like any other wand user however.
- Magical Girl Lyrical Nanoha A's Portable : The Florian sisters in The Gears of Destiny are Ridiculously Human Robots who are just as capable of using magic as the rest of the cast. This is not the case in the Reflection/Detonation duology, as they are changed to being Human Alien girls infused with nanobots instead of robots, and their particular magic system is stated to not actually be magic in the movie continuity.
- Mega Man X1: If you manage to find the secret capsule that contains the Hadouken powerup, Dr. Light's hologram says that the technique is powered by the soul, and X (despite being a robot) has a soul that's close to a human.
- Overwatch: While Orisa and Bastion have clearly technological abilities, that line gets blurry in regards to Zenyatta and presumably some of the other Nepalese Omnics, as the faith he follows apparently grants him levitation, and temporary invincibility, among other things.
- Planescape: Torment had an Evil Wizard Construct in the Mordon Maze.
- Slay the Spire: The Defect is just as capable of using spells as any other player character.
- In Sonic Heroes, one of the robots in Hang Castle and Mystic Mansion is the Egg Bishop, which can cast a healing spell on any robots it is near, including itself. When flipped over with a tornado jump, the Egg Bishop becomes the Egg Magician, which retains the healing spell, and also cats a spell that can drain rings from any team players within range of it.
- Steam World Quest is full of steam-powered robots, yet there are those who can explicitly cast spells. The one in your party who can do so is Copernica, Instant Runes and all.
- RWBY: Only living things can generate Aura, which gives humans who master the power the ability to manifest their power as special abilities that can seem like superhero powers or even magic-like in function. Although Penny is a Robot Girl, she is the very first artificial creation that is capable of sustaining an Aura. In Volume 7, Penny becomes the unplanned successor to the Winter Maiden's powers when her robotic body makes her the only one capable of safely reaching Fria. Her compassion for the dying Maiden creates the intimate connection needed for the powers to pass to her, transforming her into a genuine magic-user.
- Adventures of Sonic the Hedgehog: In "The Magic Hassle", Coconuts, a robotic monkey, buys a series of magic tricks from Wes Weasley to catch Sonic and get on Robotnik's good side, since Robotnik always assigns him to janitorial work, which he hates. Among the things Coconuts buys are a disappearing spell, a ghost-conjuring kit, a mastodon bone that can turn things to stone, and a bad luck emitter. Coconuts even dons a wizard's hat and cape as he performs these magic spells. At the end of the episode, Weasley forces Robotnik to pay a 359 million Mobium I.O.U. debt, and Robotnik chases him and Coconuts away with the bad luck emitter.
- Family Guy: A Cutaway Gag in the Season 12 episode "The Most Interesting Man in the World" involves a Show Within a Show called "Wizard Robot and his less successful friend".
- The Transformers: The season 3 episode "Madman's Paradise" features as its villain a Quintesson that had been banished by his fellows as a heretic because he practiced magic. Granted, it's not clear if the Quintessons are fully Mechanical Lifeforms like Cybertronians or Cyborgs .