She started writing the story in June 1816 during a trip to Switzerland with her future husband Percy Shelley, Lord Byron, and others. They were stuck indoors due to bad weather, and they decided to have a competition to see who could write the best horror story.
*Frankenstein* was finished by the following year, 1817.