Andrew Neiman is a first-year student at the prestigious Shaffer Conservatory in New York City. He has been playing drums from a young age and aspires to become a world-class drummer like Buddy Rich. Terence Fletcher, conductor and bandleader of Shaffer Conservatory Studio Band, invites him into the ensemble as alternate for core drummer Carl Tanner. However, Andrew quickly discovers that Fletcher is relentlessly strict, ruthless and abusive to his students. When the band rehearses the Hank Levy piece “Whiplash” and Andrew struggles to keep the tempo, Fletcher hurls a chair at him, slaps him multiple times and berates him in front of the ensemble.

In a jazz competition, after their first set, Andrew misplaces Tanner’s sheet music. When called for their second set, Tanner cannot play without his sheets, but Andrew claims he can perform “Whiplash” from memory. After a successful performance, Fletcher promotes Andrew to core drummer for the Studio Band, but he also recruits Ryan Connolly, the core drummer from a lower-level ensemble within the conservatory. Andrew believes Connolly is a less talented drummer than he and is infuriated when Fletcher promotes Connolly to core. Determined to impress Fletcher, Andrew breaks up with his girlfriend, Nicole, to focus on his musical ambitions, and practices until his hands bleed. After a five-hour session with Tanner and Connolly for the core spot, in which Fletcher hurls objects and screams at them, Andrew finally earns back the core spot.

On the way to their next competition, the bus Andrew is riding breaks down. He rents a car but arrives late and realizes he left his drumsticks at the rental office. After convincing an impatient Fletcher to wait for him, Andrew races back and retrieves them, but his car is hit by a truck on the way back. He crawls from the wreckage and runs back to the theater, arriving just as the ensemble enters stage. Bloody and injured, Andrew struggles to play “Caravan,” in which Fletcher halts the performance and dismisses Andrew, who then attacks him on stage, resulting in his expulsion from Shaffer.

At his father’s request, Andrew meets a lawyer representing the parents of Sean Casey, a former student of Fletcher, in an ethics complaint against Shaffer. Contrary to Fletcher’s prior claim that Sean died in a car accident, the lawyer explains that Sean hanged himself out of depression and anxiety spurred on by Fletcher’s abuse. Sean’s parents want to see Fletcher forbidden from teaching again; Andrew agrees to testify as an anonymous witness, and Fletcher is fired.

Following his expulsion, Andrew has abandoned drumming and is working in a restaurant. He later discovers Fletcher performing as a pianist at a jazz club. Fletcher spots Andrew and invites him for a drink. Fletcher explains his dismissal from Shaffer and admits that his teaching methods were harsh, but he only wanted his students to push themselves to become their absolute best, referencing Charlie Parker’s success story as an example. When Andrew asks if his methods would instead discourage students, Fletcher replies that the next Charlie Parker would never be discouraged. Fletcher invites Andrew to perform with his band at the JVC Jazz Festival, as they would be playing the songs Andrew was confident in from their time at Shaffer, and Andrew accepts. Andrew invites Nicole to the performance, but she declines as she is in a new relationship.

Andrew arrives at JVC and the band goes onstage. Just before they begin their first piece, Fletcher reveals that he knows Andrew testified against him and, as revenge, leads the band with a song Andrew does not know and has not been given the sheet music for. Andrew walks off stage humiliated, but then returns to the stage and cuts off Fletcher’s introduction to their next piece by playing “Caravan,” cueing in the band himself. Fletcher is taken aback but resumes conducting. After Fletcher cues to the last beat of the piece, Andrew continues playing, performing an extended solo. After a moment of disbelief, Fletcher nods in approval of Andrew’s performance before cueing the band finale.