What Inspired the Writing of Frankenstein?

Mary Shelley wrote Frankenstein because a perfect storm of influences converged in the summer of 1816: a volcanic catastrophe that trapped her indoors, a ghost story competition among friends, cutting-edge electrical experiments on dead bodies, and a deep personal grief over the death of her infant daughter. No single factor explains the novel. It emerged from all of them at once.

The Ghost Story Challenge at Villa Diodati

In June 1816, eighteen-year-old Mary Godwin (she would later marry Percy Shelley) was staying near Lake Geneva with a small group of literary figures. The party included Lord Byron, Percy Bysshe Shelley, Byron’s personal physician John Polidori, and Mary’s stepsister Claire Clairmont, who was Byron’s lover. Rain kept them confined indoors for days. One evening, after the group had been reading a collection of German ghost stories, Byron issued a challenge: “We will each write a ghost story.”

Byron and Percy Shelley quickly lost interest in the exercise. Polidori eventually produced a short work that became The Vampyre, one of the first vampire stories in English literature. Mary struggled for days to come up with an idea, feeling the pressure of competing with two of England’s most celebrated poets. The story she finally conceived would outlast anything the others produced that summer.

Electricity and Dead Bodies

The conversations at Villa Diodati didn’t stay on ghosts for long. Mary later recalled that Byron and Percy Shelley discussed the nature of life itself, including whether a corpse could be reanimated. These weren’t idle fantasies. They were grounded in real experiments that had captured the public imagination.

In the 1780s, the Italian scientist Luigi Galvani had discovered that applying an electrical spark to the nerve of a dead frog’s leg caused the muscle to twitch and contract. He proposed that “animal electricity” propagated through living tissues, a concept that laid the groundwork for our modern understanding of how nerves work. But at the time, the more exciting implication was obvious: electricity seemed to blur the line between life and death.

Galvani’s nephew, Giovanni Aldini, took this work to a dramatic extreme. In 1803, at the Royal College of Surgeons in London, Aldini applied electrical arcs to the body of George Forster, a man who had just been executed for murder at Newgate Prison. The corpse had hung for an hour in freezing temperatures before Aldini went to work. When he applied the current, Forster’s jaw quivered, his left eye opened, his face convulsed, and one hand clenched. The experiments continued for more than seven hours after the execution. The Times reported that a principle had been discovered “by which motion can be restored to Dead Bodies.” Aldini denied any intention of bringing corpses back to life, but as one account noted, everyone in that room would have considered it a triumph if he had.

Percy Shelley directly referenced the theories of Erasmus Darwin (Charles Darwin’s grandfather) in his preface to the 1818 edition of Frankenstein. Darwin had speculated that the simplest forms of life could arise spontaneously from decomposing organic matter, suggesting that the boundary between living and nonliving material was more porous than anyone assumed. For Mary Shelley, these ideas offered the scientific plausibility her story needed. Victor Frankenstein didn’t use magic. He used something that felt disturbingly possible.

The Year Without a Summer

The reason Mary Shelley was stuck indoors in the first place was one of the worst climate disasters in recorded history. In April 1815, Mount Tambora in present-day Indonesia erupted with catastrophic force, ejecting massive amounts of ash and sulfur into the upper atmosphere. The particles blocked sunlight across the globe. By the summer of 1816, temperatures in the Geneva region had dropped dramatically. Afternoon temperatures were shifted by nearly 4°C below normal, largely because persistent cloud cover blocked the sun. Warmer-than-average days essentially vanished.

The result was cold, relentless rain throughout what should have been a warm Swiss summer. Crops failed across Europe. The skies were dark and oppressive. For the group at Villa Diodati, the weather created an atmosphere that was almost theatrical in its gloom, perfect for telling ghost stories by firelight. The novel that emerged carries this atmosphere on every page: icy landscapes, isolation, and a sense that nature is indifferent or even hostile to human ambition.

The Death of Her First Child

Behind the literary competition and the scientific debates, Mary Shelley carried a grief that shaped Frankenstein at its emotional core. In February 1815, she had given birth to a premature daughter who survived only about two weeks. The loss haunted her. A journal entry from March 19, 1815, reads: “Dream that my little baby came to life again; that it had only been cold, and that we rubbed it before the fire, and it lived.”

That single diary entry contains the emotional blueprint of Frankenstein: the desperate wish to reverse death, the belief that warmth or effort or science might restore what was lost, and the anguish when it cannot. By the time she sat down to write the novel, Mary had also given birth to a second child (her son William), which meant she was simultaneously navigating new motherhood and unresolved grief. The novel’s obsession with creation, responsibility, and the consequences of bringing new life into the world without being prepared to care for it draws directly from this experience.

The Waking Dream

After days of failing to produce a ghost story, Mary Shelley finally had her breakthrough. She later described lying in bed, unable to sleep, when a vivid image came to her unbidden. “I saw the pale student of unhallowed arts kneeling beside the thing he had put together,” she wrote in her 1831 introduction. The vision was of a man who had assembled a human form and, through some powerful engine, managed to give it a spark of life, only to be horrified by what he had done.

She realized that the image that terrified her would terrify others too. The next morning, she began writing. What started as a short ghost story expanded, with Percy Shelley’s encouragement, into a full novel.

The World of Body Snatching

Victor Frankenstein’s need to collect human body parts for his creation wasn’t pure fiction. It reflected a real and deeply unsettling aspect of early 19th-century British life. Medical schools needed cadavers for anatomy instruction, but the legal supply was almost nonexistent. Grave robbers, known as “resurrection men,” dug up fresh corpses and sold them to schools for up to £10 each. The situation was so extreme that medical students were sometimes convicted simply for having bodies in their possession.

The problem escalated to murder. In Edinburgh and London, people were killed specifically so their corpses could be sold to anatomy schools. Two men, John Bishop and Thomas Williams, were hanged in London for exactly this crime. Parliament eventually passed the Anatomy Act of 1832, which allowed unclaimed bodies from workhouses to be used for dissection, though critics warned this would turn every workhouse keeper into “a systematic trafficker in dead bodies.” Mary Shelley was writing in a culture where the procurement of human remains for scientific study was a real, visible, and morally fraught practice. Frankenstein’s secret work in charnel houses and graveyards would have felt uncomfortably recognizable to her readers.

How Shelley’s Views Evolved After Publication

The novel was first published anonymously in 1818, when Mary Shelley was twenty years old. In that version, Victor Frankenstein is a man with free will who makes terrible choices. He could have abandoned his experiment. He could have cared for the creature. He could have protected the people he loved. He chose not to, and the novel holds him accountable.

By the time Shelley revised the book for a new edition in 1831, her worldview had darkened considerably. She had lost more children, her husband had drowned in 1822, and several close friends had died. In the revised text, she stripped Victor of his moral agency. He becomes a pawn of fate, driven by forces beyond his control. Nature, once portrayed as an organic and complex force, becomes a “mighty machine,” an imperial tyrant whose constant changes bring only death. Human beings are reduced to “playthings,” puppets manipulated by destiny.

The 1831 edition is the version most people read today, and its fatalism reflects a woman who, as one scholar put it, had lost faith in the possibility that a generous and loving response to human nature might create a world without monsters. The novel that began as a ghost story challenge ended up absorbing every loss Mary Shelley experienced across a decade and a half of extraordinary suffering.