Green stated that the first inspiration for The Fault in Our Stars came from when he worked as a student chaplain at a children's hospital. He found the children to be as human as healthy people, and wanted to capture the feeling that "the stories that I was reading sort of oversimplified and sometimes even dehumanized them. And I think generally we have a habit of imagining the very sick or the dying as being kind of fundamentally other. I guess I wanted to argue for their humanity, their complete humanity." He was initially intimidated by the idea and knew that it was not his story to tell, but said he has received positive comments from sick children. The novel was also influenced by Esther Earl, a girl whom Green was friends with who died when she was 16 years old of thyroid cancer. Green credits Earl for inspiring him to finally write the book, as she demonstrated how a short life could also be a full one. Green was able to add the humor he wanted to the story, as in 2000 when he received the inspiration at the hospital he was too angry at people dying young that he did not feel he would be able to capture the complexity of their lives. In its early stages, the novel was about a group of young cancer patients who formed a "Dead Person's Society", and would sneak out to convene in a cave near the children's hospital. The birth of his first child during the writing process also influenced The Fault in Our Stars, as it allowed him to understand the love between parent and child.
Green once considered writing the story from Isaac's point of view, as it fit into the epic genre, going so far as the storyteller being blind. Ultimately, he decided to use Hazel's point of view, as books rarely depict cancer patients from their point of view. Hazel's father's belief that "the universe wants to be noticed" came from YouTuber Vi Hart, who explained her point of view to Green in conversation. Green has stated that the last line of the book, "I do", symbolizes marriage because "Shakespeare's comedies end in marriage and his tragedies end in death, and I was rather fond of the idea that my book could end (symbolically, at least) in both."