The original edition was illustrated by Fanny Y. Cory, with twelve full-page color pictures plus smaller pen-and-ink sketches at the head and foot of each chapter.
In that original edition, the book's title page bore this inscription, as a sort of sub-subtitle:
- Founded Upon the Mysteries of Electricity and the Optimism of Its Devotees. It was Written for Boys, but Others May Read It.
Baum begins his story with a short note to the reader titled "Who Knows?" ("The impossibilities of yesterday become the accepted facts of today") and a quote on wonder from Samuel Taylor Coleridge.
Rob Joslyn is in most respects an ordinary American teenager; his one distinguishing peculiarity is his passion for the new science and craft of electricity. He has his own laboratory in the attic of the family home, and has rigged the house with his electrical gadgets. One day, amid the bewildering cluster of circuits and wires in his workshop, Rob causes a blinding flash of light — from which emerges the Demon of Electricity.
This being has appeared because Rob has accidentally triggered the "master key" of electricity. The Demon has come to bestow upon humankind the benefits of electrical knowledge and its consequent technological applications. Like an Arabian Nights genie, the Demon gives Rob three wishes; and when the boy confesses that he has no idea what to wish for, the apparition itself decides upon three electrical innovations:
- a box of "electrical concentrated food tablets" that can replace normal meals for sustenance;
- an electric-shock tube for non-fatal self-defense (an anticipation of the taser);
- and a traveling device, like a magic wristwatch that enables the wearer to fly through the air.
The Demon also pledges to return weekly, twice more, to bestow more inventions on the boy (three wishes times three).
The Demon wants Rob to display these devices to leading scientists to further human welfare. Instead, Rob uses them to go off on a boyish adventure that leads him to encounters with pirates and African cannibals. The boy returns home just in time for the Demon's second visit.
Fully aware of Rob's escapades, the Demon is frustrated and disappointed; he gives Rob another chance to utilize electrical knowledge more productively. His second trio of gifts includes:
- a "garment of protection" that defends the wearer from bullets, blades, and other assaults;
- a "record of events" that functions like an instantaneous television and news service;
- and a "character marker," a pair of eyeglasses that reveal people's hidden personality traits.
Rob makes a second journey that shows somewhat more promise than his first. He flies to Europe, and meets the King of Great Britain and the President of France. Traveling eastward, he goes to Yarkand in China where the Turks and Tatars are at war. He is captured by the Turks and deprived of most of his devices; only the garment of protection saves his life. Freed by Tatars, Rob must struggle to regain his technology and be on his way.
In Japan he is attacked by roc-like giant birds. He rescues two shipwrecked sailors from an island in the Pacific Ocean. He also discovers that some people are willing to murder him to possess his devices. After a dangerous and exhausting ordeal, Rob returns home in time for the Demon's third and final visit.
The Demon starts to explain his last set of gifts, which were to include:
- an "electro-magnetic restorer" that functions like a technological version of the Fountain of Youth;
- and an "illimitable communicator" that allows instantaneous contact with anyone on the planet.
Yet Rob does not allow the Demon to finish. He has decided that humanity is not ready for gifts of such power; and he returns all of the Demon's technology. "You're a very decent sort of Demon, and I've no doubt you mean well," Rob states; but the boy has concluded that any extreme accelerated development of humanity is unnatural and fraught with risk. Rob thinks that he accidentally struck the master key of electricity long before the world was ready for the consequences.
The incredulous and despondent would-be genie departs; and Rob admits that he has "had enough" of his misadventures and has "learned his lesson" — "It's no fun being a century ahead of the times!"
The book's hero was based on Baum's second son Robert Stanton Baum, who was fifteen years old at the time and was fascinated with electricity. (Like the fictional Rob, the real Robert had a workshop in the attic, and rigged the Baum home with electrical devices, so that bells would ring when people opened doors, and the gas lights could be turned on with electricity, among other tricks.) Baum dedicated the book to Robert, and in the copy he presented to his son wrote,
- "...his workshop first gave me the idea of an electrical story and 'The Electrical Demon' was a natural sequence[.]"
The Master Key is often classified as an early work of science fiction, though it has a significant fantasy element, as the subtitle suggests. (The Arabian Nights influences are obvious, in the genie-like Demon with his triplets of "wishes," and the attack of the giant birds.) Conversely, Baum's Oz books are normally classified as fantasies, though critics like Martin Gardner have noted their science-fiction elements: Tik-Tok the mechanical man, an early robot; or the submarines and submersible city in Glinda of Oz.
In 1974, Hyperion Press issued a reprint of the book, with an Introduction by David L. Greene and Douglas G. Greene, and with the original Cory illustrations (though reproduced in black and white rather than color).
- L. Frank Baum. The Master Key: An Electrical Fairy Tale. Introduction by David L. Green and Douglas G. Greene. Westport, CT, Hyperion Press, 1974.
- Angelica Shirley Carpenter and Jean Shirley. L. Frank Baum: Royal Historian of Oz. Minneapolis, Lerner Publications, 1992.
- Carrie L. Hedges. "The Master Key: Its Electrical Origins." The Baum Bugle, Vol. 45 No. 3 (Winter 2001), pp. 6-12.