Rock band No Vacancy performs at a nightclub three weeks before auditioning for a Battle of the Bands competition. Guitarist Dewey Finn engages in on-stage antics, including a failed stage dive that abruptly ends the performance. The next morning, Dewey wakes up in the apartment he lives in with his friend, Ned Schneebly, and Ned's girlfriend, Patty Di Marco. They inform Dewey that he is overdue on his share of the rent, and that he must make up for it within one week or move out. When Dewey meets No Vacancy at a rehearsal session, he finds out that he has been replaced by another guitarist named Spider. Later, while attempting to sell some of his equipment for rent money, Dewey answers a phone call from Rosalie Mullins, the principal of the Horace Green prep school, inquiring for Ned about a short-term position as a substitute teacher. Desperate for his rent money, Dewey impersonates Ned and gets the position. On his first day at school, "Mr. S" (the name Dewey adopts when realizing he doesn't know how to spell Schneebly) behaves erratically, much to the class' confusion.
The next day, Dewey overhears the students playing their instruments in music class and devises a plan to form them into a new band to audition for Battle of the Bands. He casts classical guitarist Zack Mooneyham as lead guitarist, percussionist Freddy Jones as drummer, cellist Katie on bass, pianist Lawrence on keyboard, and himself as lead vocalist and rhythm guitarist. He assigns the rest of the class to various roles of backing vocalists, groupies, roadies, with Summer Hathaway as band manager. The project replaces normal lessons, but helps the students to embrace their talents and gain confidence. He reassures Lawrence, who is worried about not being cool enough for the band; Zack, whose father personally disapproves of rock music; and Tamika, an overweight girl who is too self-conscious to audition for backup singer despite having a powerful singing voice. During one eloquent lesson, Dewey teaches the kids that rock and roll is the way to "Stick it to the Man" and stand up for themselves. Band "groupies" Michelle and Elani, with Summer's approval, pitch the band name "The School of Rock."
Two weeks into his hiring, Dewey sneaks some of his students out of school to audition for a spot in the competition, while the rest of the class stay behind to maintain cover. When Freddy wanders off, Dewey retrieves him, but the group is rejected because the bill is full. After Summer tricks the staff into thinking that the students all have a terminal illness, the band is added to the bill. The next day, Mullins decides to check on Dewey's teaching progress, forcing Dewey to teach the actual material. Mullins explains that a parents' night will take place at the school the day before Battle of the Bands. Dewey and Mullins strike up a friendship over their shared enjoyment of music, particularly Stevie Nicks, and she laments to him about how her job as principal puts her under pressure by overzealous parents.
While Dewey prepares for the parents' night, Ned receives a paycheck from the school via mail, and eventually learns of Dewey's treachery. During the parents' meeting, the parents inquire about what Dewey was teaching the kids, so he explains to the parents as best he can. The meeting is halted when Ned, Patty, Mullins and the police arrive (Patty had called the police). Dewey then reveals his real name, admits he's not a licensed teacher and abruptly leaves after the parents misinterpret his statement about “touching” the kids and being "touched" by them. Back at the apartment, Dewey and Patty clash, while Ned intervenes and informs Dewey that he should move out.
The next morning, the parents cause an uproar in front of Mullins at her office, while the kids decide not to let their hard work go to waste. When the new substitute discovers that the kids are missing, she informs Mullins, and a secretly impressed Mullins and the parents race to the competition. Fed up of being constantly bulldozed around by Patty, Ned finally stands up for himself by breaking up with her and leaves to see the band perform. A school bus comes to pick up Dewey, who leads the kids to the Battle of the Bands, and decides that they should play a song written by Zack. Initially dismissed as a gimmick, the band wins over the entire crowd. Much to Dewey's dismay, No Vacancy wins, but the audience chant for School of Rock and demand an encore. The parents, while upset at the deception, admit to being impressed by the children's talent and confidence on stage, alongside an ecstatic Mullins.
Some time later, an after-school program known as the School of Rock has opened as Dewey continues to coach the students he played with before, while Ned teaches beginners.
Jack Black as Dewey Finn (lead and backing vocals, rhythm guitar) an energetic, down-on-his-luck guitarist slacker who becomes a substitute teacher
Joan Cusack as Principal Rosalie "Roz" Mullins, the overworked principal of Horace Green who secretly loves rock music.
Mike White as Ned Schneebly, Dewey's responsible but submissive roommate and best friend
Sarah Silverman as Patty Di Marco, Ned's domineering girlfriend
Miranda Cosgrove as Summer "Tinkerbell" Hathaway (band manager), the class factotum
Joey Gaydos Jr. as Zack "Zack-Attack" Mooneyham (lead guitar)
Kevin Clark as Freddy "Spazzy McGee" Jones (drums)
Rebecca Brown as Katie "Posh Spice" (bass)
Robert Tsai as Lawrence "Mr. Cool" (keyboards)
Maryam Hassan as Tamika "Turkey Sub" (lead and backing vocals)
Aleisha Allen as Alicia "Brace Face" (lead and backing vocals)
Caitlin Hale as Marta "Blondie" (lead and backing vocals)
Brian Falduto as Billy "Fancy Pants" (band stylist)
Zachary Infante as Gordon "Roadrunner" (assistant, lights)
James Hosey as Marco "Carrot Top" (assistant, special effects)
Angelo Massagli as Frankie "Tough Guy" (security)
Cole Hawkins as Leonard "Short Stop" (security)
Jordan-Claire Green as Michelle (groupie)
Veronica Afflerbach as Eleni (groupie)
Adam Pascal as Theo (lead singer, guitar)
Lucas Babin as Spider (lead guitar)
Lucas Papaelias as Neil (bass)
Frank Whaley as Battle of the Bands Director (uncredited)