Andrew Neiman (Miles Teller) is a first year student at the Shaffer Conservatory of Music. He is an aspiring jazz drummer, as he is seen riffing on a drum set. In enters the school's most well-known teacher, Terence Fletcher (J.K. Simmons). He notices Andrew playing, and Andrew stops. Fletcher asks him why he stopped, and Andrew resumes. Fletcher then asks why he started again. He lets Andrew keep playing until he just leaves the room, but not before returning to get his coat.
Fletcher spots Andrew playing during one of his classes and invites him to his classroom the following morning. Andrew rushes out of bed and waits for hours until Fletcher's band class takes place. Andrew sits and turns pages for another student, Carl Tanner (Nate Lang). Fletcher instructs the class to play the song "Whiplash". At one point, he stops everyone because one student is out of tune. He calls out an overweight student, Metz (C.J. Vana), for being guilty. Fletcher insults his weight and inability to figure out that he's out of tune, driving Metz to tears and forcing him to leave. After Metz leaves, Fletcher states that it wasn't Metz that was out of tune, but another student. After class, Fletcher talks to Andrew and asks if any of his parents were musicians. He says no, and also that his mom left when he was a baby. Fletcher mentions an anecdote about Charlie Parker when he was playing with Jo Jones, and Jones threw a cymbal at Parker's head after he made a mistake.
Andrew goes to the movie theater that he frequently visits with his dad Jim (Paul Reiser). He approaches the girl at the concession stand, Nicole (Melissa Benoist), and asks her out on a date. She tells him to go away, but it's just a joke. She agrees to go out with him the following Monday.
Fletcher invites Andrew to join his orchestra as the drummer. Andrew ends up making a mistake by rushing his bit. Fletcher calls him out and humiliates him in front of the whole class by asking if he was rushing or dragging. He slaps Andrew several times as he continues to ask until Andrew gets it right. He sheds two tears as Fletcher makes him yell out that he's upset.
What follows is Andrew practicing like crazy in his room. He moves his bed and brings in a drum set, playing until he's found a proper pace to play. This becomes so intense that his hands start to bleed.
On their date, Andrew takes Nicole to a pizza place. We learn that Andrew is a bit shy since Nicole noticed he was always looking down at the floor whenever he came in. He says his dad said he had an eye contact problem. Nicole says her mom used to make fun of her chin. They both think they're not well-liked in their respective schools (she goes to Fordham).
The orchestra gets together for a jazz competition. Before the performance, Andrew spots Fletcher talking to a friend and his young daughter. He seems friendlier with them than with his students. Tanner then gives Andrew a folder with the music for "Whiplash", only for Andrew to lose it moments later. Tanner yells at him and then has to admit to Fletcher that the music is lost. Andrew says he remembers the song by memory. Andrew goes up and plays the drums to the song, and the orchestra wins the competition. Andrew is later made a core member of the orchestra, replacing Tanner.
Jim hosts a dinner with some guests at the table. They ask Andrew about his studies, while the other two boys at the table are said to be playing football. Andrew thinks they are being condescending since he hasn't played sports and doesn't have many friends in what he does, and he coldly shoots them down as they invite him to play with them.
Andrew then breaks it off with Nicole at a diner, thinking that she would weigh him down as he tries to improve himself and be one of the best. She is hurt and she leaves him.
Fletcher starts off a class by telling the students about a former player he taught named Sean Casey. Fletcher admired him and was saddened to learn that Sean died in a car accident. He later brings in another student, Ryan Connolly (Austin Stowell), to play in the core, to Andrew's dismay. Fletcher puts the two of them, plus Tanner, together until one of them plays the song at the proper pace. He forces all three of them to take turns, as he is totally unsatisfied with any of their performances. Fletcher taunts Andrew by saying no wonder his mom left him. He keeps them there for hours until they are sweating and bleeding, when Andrew finally gets it right. Fletcher makes Tanner and Connolly clean the blood off the drums.
The orchestra gets together for another competition. Andrew takes the bus, which gets a flat tire. He runs to the nearest car rental place and is late for rehearsal. Fletcher puts Connolly on core. Andrew argues with him about making this decision, when he realizes he left his drumsticks back at the rental place. He runs back and rushes to make it back to the concert hall, only to get hit by a truck as he drives. Although he's bloodied and wounded, Andrew runs back to the concert hall and joins the orchestra as they're already playing. He joins in the performance, but he drops a stick in the process, ruining the performance. Fletcher tells Andrew he's done. He goes to apologize on behalf of the school to the audience, which sets Andrew off. He tackles Fletcher to the ground until the other boys pull him off. Andrew leaves while swearing at Fletcher.
Andrew is dismissed from Shaffer. Jim hires a lawyer, who tells Andrew that Sean Casey really hung himself after suffering and anxiety from Fletcher. Andrew at first tries to defend Fletcher, but both Jim and the lawyer insist Andrew gives a statement that won't go to court. Andrew asks what he should say.
It's now summer. Andrew works at a sandwich shop. He passed a jazz club that advertises Fletcher as a guest. Andrew goes inside to see the man playing piano. Afterwards, Fletcher sees Andrew and they sit to have a drink. He tells Andrew he's not at Shaffer anymore. He acknowledges his abrasive behavior but says it was only to push his students beyond what was expected of them, and he will never apologize for that. Before he and Andrew part ways, Fletcher invites him to play with his jazz band at an upcoming performance. Andrew accepts.
Andrew calls Nicole and apologizes for the way he acted. He invites her to see the performance, but she says she'll have to check with her new non-jazz-loving boyfriend.
It's the night of the performance. Andrew gets the notes for "Whiplash" out. Fletcher passes Andrew and whispers he knows it was him that got Fletcher canned. As retribution, Fletcher announces to the audience that they will be playing the song "Upswingin'", for which Andrew has no notes. He tries winging it during the performance, only to throw off the band and make himself look bad. Andrew walks away, embarrassed. He finds Jim waiting backstage. He hugs his son. However, Andrew decides not to get discouraged. He returns to the stage and grabs his sticks. He starts playing the song "Caravan", and then cues in the other players. The band plays the song up until Andrew performs a rapid-paced drum solo, to everyone's surprise. He sweats and bleeds but never skips a best. Fletcher is moved to tears and he smiles at Andrew. Andrew smiles back. Fletcher cues the band to finish it off as the audience cheers and applauds loudly.