The story of O Pioneers! begins in the dedication and poem which precede the work. Cather dedicates O Pioneers! "To the memory of Sarah Orne Jewett, in whose beautiful and delicate work there is perfection that endures." Cather met Jewett in 1908, only a year before her death, but ever after modeled her own writing career after Jewett's. Jewett wrote twenty volumes of fiction about the rural region of Maine where she grew up and her body of work helped Cather to realize that she should write about her memories of the pioneer west. Jewett told Cather that whatever she could not get out of her head is what she ought to write about, and Cather took those words to heart. O Pioneers!, then, is an act of memory for Cather.
The novel began as a novella called Alexandra, which Cather wasn't entirely happy with. The novella told the story of the first two-thirds of O Pioneers!: Alexandra's taming of the land and the effect of settlement on her family. Cather set the novella aside and began work on a short story inspired by the tale of Paolo and Francesca in Dante's Divine Comedy. In that tale, Dante expresses sympathy for Paolo and Francesca, who are in hell for committing adultery, suggesting that they gave in to unbearable temptation without intending to do wrong. In her adaptation of this story, which she named "The White Mulberry Tree," Cather told the story of the fatal passion of Marie and Emil. After finishing both works, Cather realized that they belonged together. She retained the titles of both stories as section names in O Pioneers!.
When Cather finished the novel, she was very worried about its success. She finally sent it to a very close friend, Elizabeth Shipley Sergeant, who was living in Paris at the time. Sergeant greatly admired the novel and shared it with the French family she was staying with as well as a young woman from Boston. All who read it found it beautiful and moving. Sergeant's only criticism was that the underlying structure seemed a weak. In response, Cather explained that she wanted the land to be the "hero" of the piece, and this kind of land had no underlying structure. Whether or not Cather is successful in making the land the hero (or anti-hero) of the story, some of the most famous sections of the book are her descriptions of the land and of Alexandra's relationship with the land.
Cather wrote the poem which precedes the text soon after she completed the novel itself. It was the first poem she had published in McClure's Magazine, and it is unclear whether she always intended it to be part of the story. In any case its thematic resonance with the story is clear. Some critics also note that Cather's style in this poem is very similar to Whitman's, and that Cather also took the title for the book from Whitman's "Leaves of Grass." In this poem Whitman expresses some of the same ideas that Cather's narrator does about the pioneer spirit and the role of the pioneer. Whitman suggests that pioneers must be willing to strike out and do what others are afraid to do, and that the achievements of pioneers refresh the spirits of others.
Biographical research suggests that O Pioneers! reveals a great deal about Cather's feelings on religion and marriage. Despite Cather's ability to sympathize with Emil and Marie, like Dante and her own Ivar, she believes that adulterers cannot go to heaven. Perhaps as a consequence, she sees something dangerous about passionate love. Alexandra tells Carl that they will be happy because their marriage will be based on friendship rather than youthful passions. It is easy to find Alexandra's words to be sad, and to feel that her relationship is cold comfort for a lonely life; however, Cather's other writings support the idea that Alexandra represented her own opinions about happy marriage.