The film is set against the background of a young student, Charlie (Logan Lerman), who has been suffering from clinical depression from childhood setbacks and has recently been discharged from a mental health care institution to begin his adaptation to a normal lifestyle as a young high school student. Charlie is uneasy about beginning his freshman year of high school; he is shy and finds difficulty in making friends, but he connects with his English teacher, Mr. Anderson (Paul Rudd).
When he sits with two seniors, Sam (Emma Watson) and her stepbrother Patrick (Ezra Miller), at a football game, they invite him to tag along to several social activities with them. At a party, Charlie unwittingly eats a cannabis brownie, gets high and discloses to Sam that the year before, his best friend committed suicide. He also walks in on Patrick and Brad (Johnny Simmons), a popular athlete, kissing. Sam realizes that Charlie has no other friends so she and Patrick make a special effort to bring Charlie into their group. Sam needs to improve her SAT scores to be accepted to Pennsylvania State University, so Charlie offers to tutor her. On the way home from the party, when the three hear a song with which they are unfamiliar, Sam instructs Patrick to drive through a tunnel so she can stand up in the back of the pickup while the music blasts.
At Christmas, Sam gives Charlie a vintage typewriter to help his aspirations of being a writer. The two discuss relationships, and Charlie reveals he has never been kissed. Sam, though already involved with someone else, tells Charlie she wants his first kiss to be from someone who loves him, and kisses him. Charlie, in love with Sam, begins to try to find ways to show her how he feels.
At a regular Rocky Horror Picture Show performance, Charlie is asked to fill in for Sam's boyfriend Craig, who is unavailable. Their friend Mary Elizabeth (Mae Whitman) is impressed and asks Charlie to the Sadie Hawkins dance. The two enter into a desultory relationship. Finally, at a party, when Charlie is dared to kiss the most beautiful girl in the room, he chooses Sam, upsetting both her and Mary Elizabeth. Patrick recommends Charlie stay away from the group for a while, and the isolation causes him to sink back into depression. He experiences flashbacks of his Aunt Helen (Melanie Lynskey), who died in a car accident when he was seven years old.
When Brad shows up at school with a black eye having been caught by his father having sex with Patrick, he lies, saying that he was jumped and beaten up. Brad distances himself from Patrick, calling him a "faggot". Brad's friends begin beating Patrick, but Charlie forcefully intervenes, then blacks out. He recovers to find he has bruised knuckles and Brad's friends are on the floor, incapacitated. Charlie threatens, "Touch my friends again, and I'll blind you," then leaves. Sam and Patrick express their gratitude to Charlie, and the three become friends again.
Sam is accepted into Penn State, and breaks up with Craig on prom night after learning he has been cheating on her. The night before she departs, she brings Charlie to her room and asks him "Why do I and everyone I love pick people who treat us like we're nothing?" to which he repeats advice he received from Mr. Anderson, "We accept the love we think we deserve." They confide in each other and kiss, but when Sam touches Charlie's thigh, he experiences a momentary flashback of his Aunt Helen, which he passes off as nothing, and they continue to kiss. After she leaves for college, though, his emotional state deteriorates and his flashbacks worsen. He calls his sister blaming himself for Helen's death, and admits he may have wished it upon her. His sister realizes he is in trouble and calls the police. Charlie passes out as they burst through the door and wakes up in a hospital, where psychiatrist Dr. Burton (Joan Cusack) manages to bring out Charlie's repressed memories of his aunt sexually abusing him.
Charlie then is later visited by Sam and Patrick. Sam explains what college life is like, and how she has found "The Tunnel Song" — "Heroes" by David Bowie. The three revisit the tunnel, where Charlie kisses Sam again and stands up in the back of the truck. Charlie acknowledges that he feels alive and in that moment—"We are infinite."
John Hughes read the novel and attempted to write a screenplay after he got the rights from Chbosky; however, he never finished this screenplay. Hughes was going to use the project as a directorial comeback with more of a black comedy style. He had in mind particular actors while writing the screenplay, namely, Shia LaBeouf as Charlie; Kirsten Dunst (The Virgin Suicides) as Sam; and Patrick Fugit (Almost Famous) as Patrick.
Other filmmakers who were interested in the project were Ron Howard, Richard Linklater, Josh Schwartz, McG, Joel Schumacher, Ryan Murphy and British filmmaker Danny Boyle.
Mr. Mudd Productions (producers of Juno) became interested in the project and wanted Chbosky to adapt the film. The producers—John Malkovich, Lianne Halfon, and Russell Smith—hired Chbosky to write a screenplay adaptation (instead of Hughes) and to direct the film. Chbosky found value in half of Hughes' screenplay, so he negotiated for the rights from Hughes' heirs and added his own touches. In January 2011, Summit acquired distribution rights. The following month, Summit sought a buyer for the project at the European Film Market held simultaneously with the Berlin International Film Festival.
In May 2010, actors Logan Lerman and Emma Watson were reported as in talks for the project and confirmed the following year. In April 2011, Mae Whitman signed on as Mary Elizabeth and Nina Dobrev was cast as Candace. Paul Rudd was cast as Mr Anderson later that month. On May 9, 2011, Kate Walsh announced that she was cast in the film as Charlie's mother and had begun filming.
The film was shot in the Pittsburgh metropolitan area from May 9 to June 29, 2011. Initial filming began in Pittsburgh's South Hills, including South Park, Upper St. Clair, and Peters Township High School.
The Rocky Horror Picture Show scenes were filmed at The Hollywood Theater in Dormont after Chbosky learned that the theater was re-opening; he had seen The Rocky Horror Picture Show there when younger.
The film also has scenes within Pittsburgh city limits inside the Fort Pitt Tunnel, Fort Pitt Bridge on Interstate 376 and on Mount Washington.
The film was scheduled to be released on September 14, 2012, but it was announced in August 2012 that it would be released a week later, on September 21, 2012, in selected cities. The film continued to expand on September 28, 2012, with a nationwide release on October 12, 2012. The UK premiere was on September 23 at the Cambridge Film Festival.
The film originally received an R rating for "teen drug and alcohol use, and some sexual references". The filmmakers appealed and the MPAA changed it to PG-13 for "mature thematic material, drug and alcohol use, sexual content including references, and a fight—all involving teens".
The Perks of Being a Wallflower received a limited release of four theaters in the United States on September 21, 2012, and grossed $228,359 on its limited opening weekend, averaging $57,089 per theater. The film earned $17,742,948 in North America and $15,641,179 in other countries, for a worldwide total of $33,384,127.
The film received mainly positive reviews. Review aggregation website Rotten Tomatoes gives the film a "Certified Fresh" score of 86%, based on reviews from 151 critics, with an average score of 7.4/10. The site's consensus states: "The Perks of Being a Wallflower is a heartfelt and sincere adaptation that's bolstered by strong lead performances." On Metacritic, which assigns a normalised rating out of 100 based on reviews from critics, the film has a score of 67 based on 36 reviews, indicating "generally favorable reviews".
The lead cast also received positive notices. Ian Buckwalter of The Atlantic said "The primary trio of actors delivers outstanding performances, starting with Watson, who sheds the memory of a decade playing Hermione in the Harry Potter series with an about-face as a flirtatious but insecure free spirit. Miller also plays against his most recent performance, which was as the tightly wound eponymous teenage psychopath in We Need to Talk About Kevin, to deliver a giddy, scene-stealing turn as Patrick. Lerman, best known from the Percy Jackson series, shines as Charlie, a role that demands he be immediately likeable while still holding onto some deep darkness that can't be fully revealed until the end."
John Anderson of Newsday also praised the cast saying "As Sam, the quasi-bad girl trying to reinvent herself before college, she (Emma Watson) brings honesty and a lack of cliche to a character who might have been a standard-issue student. But equally fine are her co-stars: Ezra Miller, who plays the gay character Patrick as something messy and unusual; Paul Rudd, as their English teacher, is refreshingly thoughtful. And Charlie is portrayed by Lerman as quietly observant, yearning and delicate in a way that will click with audiences regardless of age".
Allison M. Lyzenga of My Film Habit praised the film saying "This movie especially recognizes that even while high-school can be a battlefield of insecurity and bullying, you can find allies to help you through the struggle. It also shows that we all have a brighter future ahead if we let ourselves reach for it."
Some critics had a less positive response to the film, with the main criticism being that the portrayal of teenage issues is idealized and the casting uninspired. The Miami Herald critic Connie Ogle notes that "the suicide of Charlie’s best friend, which takes place before the film opens, seems glossed over too quickly" despite the event being Charlie's main character motivation in the film. Jack Wilson of The Age writes, "the script is transparently fake at almost every moment, congratulating the gang on their non-conformity while soft-pedalling any aspect of adolescent behaviour—drug use, sex, profanity—that might upset the American mainstream." Richard Corliss of Time criticized the casting of actors in their twenties to play teenagers, unlike the film Heathers where the cast were actually teenagers.
MTV, Us Weekly and Complex named The Perks of Being a Wallflower one of the best films of the year.