High school senior Carson Phillips (Chris Colfer) is randomly struck and killed by lightning and the rest of the film is a flashback of his life. He desires to go to Northwestern University in order to one day become the youngest editor for The New Yorker, but so far is having limited success in making those dreams happen.
One day during a writer’s club meeting, Malerie Baggs (Rebel Wilson) comes in to get advice about her short stories. Carson tells her not to give up, and says that she cannot find the ideas, the ideas have to find her. He later goes to a student council meeting run by head cheerleader Claire Matthews (Sarah Hyland). Claire, as well as everyone in student council, resorts to ignoring him due to his constant objections to their ideas. While Carson’s mother Sheryl is picking up several prescriptions, she makes idle small talk with the cheerful new pharmacist April Adams (Christina Hendricks), who is six months pregnant. Carson also visits his grandmother (Polly Bergen), the first person who encouraged his writing, but she does not know who he is due to Alzheimer’s disease. She tells him her grandson used to be so happy and full of life, but was now his own personal rain cloud.
As Carson is finishing up the school paper late at night, he accidentally catches wealthy student Nicholas Forbes (Carter Jenkins) and flamboyant drama club president Scott Thomas (Graham Rogers) making out in a bathroom stall. Nicholas, horrified, begs Carson not to tell anyone since his rich family would disapprove of his homosexuality. Carson agrees on the condition that they will contribute to the paper until they both graduate.
April and Carson’s father, Neal, visit Neal’s lawyer to straighten out some legal issues. April, who had no knowledge about Carson or Sheryl, storms out when she learns Neal is still legally married, and has a child of which she was unaware.
Carson’s guidance counselor (Angela Kinsey) informs him that one way to improve his chances of getting into Northwestern is to submit a literary magazine in order to show he can inspire others to write. He gets permission to start the magazine from his conservative principal (Brad William Henke). He announces at a school assembly that all entries will be taken, but later finds the submission box filled with nothing but trash. When Malerie suggests that others will eventually join because Carson convinced Scott and Nicholas to write for the school paper, Carson tells her the real reason behind their participation. She in turn reveals that she caught Claire having sex with Coach Walker (Charlie Finn), who is also the older brother of her boyfriend, Justin (Robbie Amell). Malerie goes on to say how everyone in their school probably has an embarrassing secret that they would not want exposed.
Sheryl has another run-in with April when April recognizes Carson’s name on the anti-depressant prescription. She then comes home to Neal and demands to meet his son. During the homecoming parade, Carson is forced to pull the writer’s club float himself after the cheerleaders take the car they were assigned. Feeling more humiliated than ever, Carson decides to blackmail several of his peers into writing for the literary magazine. He tricks yearbook president Remy Baker (Allie Grant) into sending him a dirty picture that could ruin her reputation. Together, he and Malerie blackmail fellow school paper members Dwayne (Matt Prokop) for bringing marijuana to school, and goth girl Vicki (Ashley Rickards) for taking BDSM-style pictures of which her church-going parents would disapprove. Carson additionally discovers that supposed foreign exchange student Emilio (Roberto Aguire) is from San Diego, knows only rudimentary Spanish, and is using his faux-exotic charm to seduce women.
During a meeting with the other students and Coach Walker, Carson extorts agreements that everyone must offer something to put in the magazine if they want their secrets to stay quiet. Carson also tells Claire and Coach Walker that they must have each cheerleader and football player submit something as well, as a way to make the issue more popular among the student body.
After school, Carson gets an unexpected call from his father. Neal tells him about April, the baby, and how he wants them to get together soon. When he has dinner with Neal and April, Carson realizes that his father is trying to make himself sound like he has been more present in Carson’s life, which quickly results in an argument and Carson leaving in anger. Later, during a student council meeting with the principal, Carson opposes a ban on clothing logos in school. As punishment, the principal revokes all off-campus privileges for students.
During another encounter at the pharmacy, Sheryl explains to April that she gave her husband everything, and was therefore left with nothing when he decided she was not enough for him and that just like April, she had a child to keep him around, but that did not change anything. Meanwhile, Carson completes the literary magazine, but it flops due to the backlash from the student body. Carson also learns that he was accepted into Northwestern, but since he never confirmed his admission, he must wait to reapply and go to community college in the meantime. Carson assumes his letter was lost in the mail, but after telling his mother, Sheryl admits she threw away his acceptance letter to protect him from her perceived “reality” that his dreams will probably never come true.
While Carson and Malerie pack up the unread literary magazines, Carson asks her why she likes to film everything. Malerie replies that “It doesn’t matter if you’re stuck in the past or if you’re trying to forget the past, what matters is what you do in the present and I try to soak it up.” As Malerie is leaving, she asks Carson if he thinks they are friends. He says they are best friends. Carson suddenly decides that there is one story left to write; his own. His voice-over explains how he finally realized that, despite everything he went through, he successfully got the other students to write for the literary magazine, so for the first time in his life, he was truly happy. He is then shown going outside as the thunder starts.
It takes over three days for people to find Carson’s body. Many people, including the principal and the students who hated him, come to the funeral. It is shown that Carson did leave an impression on everyone he knew. Malerie takes over as president of the writers’ club, while Sheryl visits her mother in assisted care.