Shelley had travelled the region in which the story takes place, and the topics of galvanism and other similar occult ideas were themes of conversation among her companions. The actual storyline was taken from a dream. Shelley was talking with her three writer-colleagues and they decided they would have a competition to see who could write the best horror story. After thinking for weeks about what her possible storyline could be, Shelley dreamt about a scientist who created life and was horrified by what he had made. Then Frankenstein was written.
Frankenstein is infused with some elements of the Gothic novel and the Romantic movement and is also considered to be one of the earliest examples of science fiction. It is partially based on Giovanni Aldini's electrical experiments on dead and (sometimes) living animals and was also a warning against the expansion of modern man in the Industrial Revolution, alluded to in its subtitle, The Modern Prometheus. It has had a considerable influence across literature and popular culture and spawned a complete genre of horror stories and films.
The name "Frankenstein" – actually the novel's human protagonist – is often incorrectly used to refer to the monster itself. In the novel, the monster is identified via words such as "monster", "fiend", "wretch", "vile insect", "daemon", and "it"; Shelley herself called it "Adam".
Mary Godwin's mother died when she was eleven days old; afterwards, she and her older half-sister, Fanny Imlay, were raised by her father. When Mary was four, Godwin married his neighbour, Mary Jane Clairmont. Godwin provided his daughter with a rich, if informal, education, encouraging her to adhere to his liberal political theories. In 1814, Mary Godwin began a romantic relationship with one of her father’s political followers, the married Percy Bysshe Shelley. Together with Mary's stepsister, Claire Clairmont, they left for France and travelled through Europe; upon their return to England, Mary was pregnant with Percy's child. Over the next two years, she and Percy faced ostracism, constant debt, and the death of their prematurely born daughter. They married in late 1816 after the suicide of Percy Shelley's first wife, Harriet.
In 1816, the couple famously spent a summer with Lord Byron, John William Polidori, and Claire Clairmont near Geneva, Switzerland, where Mary conceived the idea for her novel Frankenstein. The Shelleys left Britain in 1818 for Italy, where their second and third children died before Mary Shelley gave birth to her last and only surviving child, Percy Florence. In 1822, her husband drowned when his sailing boat sank during a storm in the Bay of La Spezia. A year later, Mary Shelley returned to England and from then on devoted herself to the upbringing of her son and a career as a professional author. The last decade of her life was dogged by illness, probably caused by the brain tumour that was to kill her at the age of 53.
Until the 1970s, Mary Shelley was known mainly for her efforts to publish Percy Shelley's works and for her novel Frankenstein, which remains widely read and has inspired many theatrical and film adaptations. Recent scholarship has yielded a more comprehensive view of Mary Shelley’s achievements. Scholars have shown increasing interest in her literary output, particularly in her novels, which include the historical novels Valperga (1823) and Perkin Warbeck (1830), the apocalyptic novel The Last Man (1826), and her final two novels, Lodore (1835) and Falkner (1837). Studies of her lesser-known works such as the travel book Rambles in Germany and Italy (1844) and the biographical articles for Dionysius Lardner's Cabinet Cyclopaedia (1829–46) support the growing view that Mary Shelley remained a political radical throughout her life. Mary Shelley's works often argue that cooperation and sympathy, particularly as practised by women in the family, were the ways to reform civil society. This view was a direct challenge to the individualistic Romantic ethos promoted by Percy Shelley and the Enlightenment political theories articulated by her father, William Godwin.