You can find mad scientists as villains in countless Sci-Fi works. The famous Eggman from Sonic game franchise is a good example.
Which Sci-Fi work introduced this idea?
You can find mad scientists as villains in countless Sci-Fi works. The famous Eggman from Sonic game franchise is a good example.
Which Sci-Fi work introduced this idea?
There are hints in mythology of people you might consider "mad scientists" of their day. A well-known example is Daedalus, the guy who invented the Labyrinth. He also invented wings to fly with, for himself and his son Icarus, with the famously tragic results.
In terms of what we'd consider "science fiction", I believe the earliest example -- more like a prototype -- of this character is Victor Frankenstein, from Shelley's Frankenstein, in 1818. As @Jason Baker notes, the character isn't quite what we've come to expect from the evil mad scientist. Frankenstein is definitely a scientist, and he probably qualifies as a little crazy, given the experiments he's performing. But in the original novel, both he and his creation are far more tragic figures that evil ones. Several subsequent butcherings adaptations of the novel, particularly in the mid 1900s, moved him and his monster more towards the evil side, which I suspect drove a similar evolution of the character archetype in other fiction.
The character of Dr. Moreau, in Wells's Island of Dr. Moreau, in 1896, shows a significant evolution towards our modern-day mad scientist trope. Again, Moreau isn't exactly evil, though his intentions aren't nearly as pure as Frankenstein's. There isn't the "world-dominating power grab" that we come to expect from a mad scientist, but his experiments and general lack of concern for the rest of the world definitely move him in that direction.
From there, the character type progresses pretty quickly; by 1927 there is Metropolis, a film that contains a clean and obvious mad scientist character; once the atom bomb was discovered, the crazy nuclear scientists intent on blowing up the world becomes commonplace, and each subsequent major scientific development brings with it their fictional crazies to match.
Probably the first example of an unambiguously "villainous" scientist character (in science fiction) is from The Island of Dr. Moreau, published in 1897.
Doctor Moreau is a vivisectionist who sets up shop on a tiny island after his horrifying experiments, giving animals human-like attributes, get him ostracised from polite society. He's the perfect image of a "mad scientist": he's got the sinister lab, the island hideout, some henchman, and (as Lobarr reminds me in comments) a total disregard for the well-being of his subjects.
The reason I suggest him over an earlier example of a "mad scientist" (I'd written half an answer on Arthur Machen's novella "The Inmost Light", and of course Frankenstein is everyone's first reaction) is that Moreau has no concern for the moral aspect of his experimentation; most other mad scientists of the day tended to express remorse, or be otherwise horrified by what they had done. Moreau just accepted it as "the cost of doing business".
There's a whole chapter in the book which is mainly Moreau talking very matter-of-factly about his work, but some of the more relevant bits are:
"Then I am a religious man, Prendick, as every sane man must be. It may be, I fancy, that I have seen more of the ways of this world's Maker than you,—for I have sought his laws, in my way, all my life, while you, I understand, have been collecting butterflies. And I tell you, pleasure and pain have nothing to do with heaven or hell. Pleasure and pain—bah! What is your theologian's ecstasy but Mahomet's houri in the dark? This store which men and women set on pleasure and pain, Prendick, is the mark of the beast upon them,—the mark of the beast from which they came! Pain, pain and pleasure, they are for us only so long as we wriggle in the dust.
"You see, I went on with this research just the way it led me. That is the only way I ever heard of true research going. I asked a question, devised some method of obtaining an answer, and got a fresh question. Was this possible or that possible? You cannot imagine what this means to an investigator, what an intellectual passion grows upon him! You cannot imagine the strange, colourless delight of these intellectual desires! The thing before you is no longer an animal, a fellow-creature, but a problem! Sympathetic pain,—all I know of it I remember as a thing I used to suffer from years ago. I wanted—it was the one thing I wanted—to find out the extreme limit of plasticity in a living shape."
"But," said I, "the thing is an abomination—"
"To this day I have never troubled about the ethics of the matter," he continued. "he study of Nature makes a man at last as remorseless as Nature. I have gone on, not heeding anything but the question I was pursuing["]
The Island of Doctor Moreau Chapter 14: "Doctor Moreau Explains"
Doctor Faust may qualify as an even earlier proto-mad scientist. Like Victor Frankenstein he is more of a tragic figure than a villanous one, but he is driven by an obsessive desire for knowledge, and eventually this brings him to commit evil acts (not just making a bargain with the Devil, but what he does afterward). According to Wikipedia the earliest known written version of this story dates to 1587. I think this is about as far back as one could plausibly go in Western literature, considering that the first European historical figures who considered themselves to be scientists, good, evil, sane, mad, or otherwise, also date to the late 1500s.
I don't personally know of any, but I would not be surprised if an earlier example could be found among the legends surrounding Eastern alchemy.
I'm going to go with The Strange Case of Dr Jekyll and Mr Hyde, published in 1886.
Henry Jekyll is a scientist who creates a potion which transforms him into another person for purposes of indulging in his vices without Jekyll losing social status.
Mr Hyde is immoral and evil. In the story, he explicitly murders people, but most of his actions are left to the imaginations of the readers (there are implications that he burgled people/homes, and fornicated with prostitutes).
It can be noted that the original intention of the potion was the exact opposite of the actual effect. Jekyll initially wanted to repress the evil within, but begins using the potion more and more often over time, despite knowing that it functions exactly opposite of what he had intended.
The transformation into Mr Hyde is not just a mental one (despite the story often being seen as a metaphor for multiple personalities), but also a physical one, as Mr Hyde is described as being both younger and smaller than Jekyll's normal form.
I think Captain Nemo from Verne's "20,000 Leagues Under the Sea" (1870) probably qualifies, and predates Wells' Dr. Moreau by almost 30 years.
While Frankenstein is probably the first example that we can call bona fide Science Fiction, the trope can be traced to far older stories. The basic elements here are a desire for knowledge that goes beyond what is considered "proper" for humans. Essentially, the trope refers to the concept of hubris in Ancient Greece:
Hubris (/ˈhjuːbrɪs/, also hybris, from ancient Greek ὕβρις) means extreme pride or self-confidence. When it offends the gods of ancient Greece, it is usually punished.
The oldest example of this I can think of (though there are bound to be even older ones) is the myth of Arachne:
In Greco-Roman mythology, Arachne (/əˈrækniː/; from Greek: ἀράχνη, cognate with Latin araneus) was a mortal woman and talented weaver who challenged Athena, goddess of wisdom and crafts, and was transformed into a spider.
Arachne could be considered a proto-mad-scientist in that her knowledge of technology (in the ancient sense of the word, techne) led her to place herself above the gods.
It is also, essentially, the same idea found in the Judeo-Christian story of the fall of man. Eve's eating of the forbidden fruit represents precisely that human quest for knowledge which the gods, or god, consider beyond humanity's purview.
The same applies for the story of the tower of Babel. Humanity tried to place themselves above god by building a tower whose height would rival the heavens and were punished for it.
These are all manifestations of the same basic trope: the power- or knowledge-hungry humans who are then punished for their hubris.
Here is a very strange answer.
For centuries or millennia people have been telling stories, which they claimed to be true, which they used as political propaganda (which some people may claim always counts as fiction) to blacken the names of their enemies.
Thus there are many men, and women, and children, in history who were either very evil or else very badly slandered by the fictional stories told about them by their enemies, or perhaps in some cases both.
And in most cases the real or fictional stories about the evil deeds of historical characters have nothing to do with the concept of mad scientists.
But sometimes those stories involve what could be called unethical research methods or forbidden experiments to satisfy a possibly somewhat scientific curiosity.
For example, there are stories about language deprivation experiments in which children are raised without being talked to or allowed to overhear speech, to see if they would learn to talk or if they did what language they might naturally speak.
Such experiments are attributed to the Mughal Padishah Akbar (reigned 1556-1605) who believed that speech arose from hearing and thus that children who didn't hear speech would be mute.
King James IV of Scotland (reigned 1488-1513) is said to have sent two children to be raised by a mute woman alone on the Island of Inchkeith to see if language is learned or innate. The children allegedly spoke Hebrew.
Emperor Frederick II is said to have had children raised by women who were forbidden to talk to them, to see what language the children would speak. Since the story was told by chronicler Salimbene di Adam who was hostile to Frederick it was probably a slander.
Herodotus (c. 484-c. 425 BC) in his histories says that Pharaoh Psamtik I (reigned 664-610 BC) had two newborn babies raised without being spoken to, hoping the babies would speak the language of the first men. It was decided that the first word the babies said was in Phrygian.
Kinmei (reigned 539-571) is the first fully historical monarch of Japan and the male line ancestor of all later monarchs. His father Keitei (reigned 507-531) was the successor of Buretsu (reigned 498-506), described in some sources as an evil boy. It is possible that Buretsu was described as cruel to justify a hypothetical usurpation by Keitei that was later deleted from the historical record. One of the cruelties ascribed to Buretsu was cutting open a pregnant woman to examine her fetus. If done out of scientific curiosity, that would definitely count as mad science.
And there are many other historical examples of alleged mad science.
Therefore there were a number of historical persons in past centuries and millennia who either 1) were sometimes actual mad (proto) scientists or else 2) were called mad (proto) scientists in fictional stories told about them. In the later case the false stories about them could possible be considered fiction about mad scientists.
Therefore it might made a little sense to nominate real persons like Pharaoh Psamtik I (reigned 664-610 BC) or Buretsu (reigned 498-506) as the earliest mad scientists in fiction, if the stories about them are believed to be fictions.
How about Giovanni Aldini? He is a real scientist (April 10, 1762 – January 17, 1834). He traveled the world with animal and human corpses, and he "reanimated the corpses with electricity" (so, he is the REAL inspiration for Frankenstein) just to show off to the public...
In January 1803, Aldini presented his most famous experiment. He was given the body of a hanged criminal, George Forster, who had been executed for the murder of his wife and child.
Displaying Forster's body for the public to see, he electrocuted his face, which started to twitch and move; his mouth and eyes opening and, according to all accounts, he looked very much alive. But believing he did not freak out the people, Aldini stuck an electrified rod straight up the corpse's ass, after which the body started to kick and punch around so much, most people were sure he came back to life and started screaming about hanging him again.
Maybe the answer to the fictional mad scientist was a real mad scientist...