Mary Shelley's mother, Mary Wollstonecraft, died from infection shortly after giving birth to her. Shelley grew close to her father, William Godwin, having never known her mother. Godwin hired a nurse, who briefly cared for her and her half sister, before marrying second wife Mary Jane Clairmont, who did not like the close bond between Shelley and her father. The resulting friction caused Godwin to favour his other children.
Shelley's father was a famous author of the time, and her education was of great importance to him, although it was not formal. Shelley grew up surrounded by her father's friends, writers, and persons of political importance, who often gathered at the family home. This inspired her authorship at an early age. Shelley met Percy Bysshe Shelley, who later became her husband, at the age of sixteen while he was visiting her father. Godwin did not approve of the relationship between his daughter and an older, married but separated man, so they fled to France along with her stepsister, Claire Clairmont. Shelley gave birth to and lost their first child on 22 February 1815, when she gave birth two months prematurely. The baby died two weeks later. Percy left with Mary's stepsister Claire for an affair. Over eight years, she endured a similar pattern of pregnancy and loss, one hemorrhage occurring until Percy placed her upon ice to cease the bleeding.
In the summer of 1816, Mary, Percy, and Claire took a trip to visit Claire's lover, Lord Byron, in Geneva. During the visit, Byron suggested that he, Mary, Percy, and Byron's physician, John Polidori have a competition to write the best ghost story to pass time stuck indoors. Historians suggest that an affair occurred too, even that the father of one of Shelley's children may have been Byron. Mary was eighteen years old when she won the contest with her creation of Frankenstein.