In writing the novel, Montgomery was inspired by notes she had made as a young girl about two siblings who were mistakenly sent an orphan girl instead of the boy they had requested, yet decided to keep her. She drew upon her own childhood experiences in rural Prince Edward Island, Canada. Montgomery used a photograph of Evelyn Nesbit, which she had clipped from New York's Metropolitan Magazine and put on the wall of her bedroom as the model for the face of Anne Shirley and a reminder of her "youthful idealism and spirituality."[12]
Montgomery was inspired by the "formula Ann" orphan stories (called such because they followed such a predictable formula) that were popular at the time, but distinguished her character by spelling her name with an extra "e".[13][14] She based other characters, such as Gilbert Blythe, in part on people she knew. She said she wrote the novel in the twilight of the day, while sitting at her window and overlooking the fields of Cavendish.[15]