At their concert two weeks before auditioning for an upcoming concert known as "Battle of the Bands", No Vacancy's drummer Dewey Finn decides to take a dive off the stage that abruptlyends the performance. Dewey eventually wakes up in his apartment with roommate Ned Schneebly and his obnoxious girlfriend Patty Di Marco pressuring him to pay his 4 month late rent.

Shortly after that, Dewey catches up with No Vacancy at a rehearsing facility. They tell him that he has been dismissed due to his on-stage antics and introduces his replacement, Spider. Worried about how he will come up with his rent money, Dewey attempts to sell some of his instruments but he is interupted by a call from Rosalie Mullins, the principle of the prestigious Horace Green rep school. She is inquiring for Ned about a short-term position as substitute, which pays generously. Desperate for money to avoid being evicted from his home, Dewey impersonates Ned and accepts the job.

On his first day, Dewey adopts the name of Mr. S and spends the entirety of the day being lazy, much to the class' confusion. On his second day, he overhears the class in their music lesson and hatches a plan to make them into a band to compete against No Vacancy in the Battle of the Bands tournament. He assigns the class their roles, and they begin secretly racticing instead of doing their norma lessons. He brings the key band members on a fake field trip to sign up for the competition, but there are some complications. Tomika gets stage fright and Freddy sneaks off to another band's van, which both ultimatley causes Dewey to discipline the band. To add to the misfortune, the band is rejected because they were too late and they were not what the manager was looking for. Dewey loses his temper and angrily tells them off while Summer, who feigns a terminal illness, gets them a spot. The following day, they are almost caught when Mullins decides to check on his teaching progress. Luckily, Dewey quickly turns the band lesson into a teaching lesson involving putting their content into a song to help with memory.

To make sure he doesn't get caught, Dewey befriends Mullins, who used to be fun-loving and free-spirited, but was dragged to her current self from the pressue of being principle and the expectations of the parents. Dewey finds out from her that there is a parent night scheduled. Befoe attending this meeting, Dewey is forced to tell Ned the truth after he receives a paycheck from the school addressed to him. Dewey begs Ned not to tell his psychotic girlfriend, but Patty demands the truth, and after Ned confesses what Dewey told him, she calls the police. At the parent meeting, the parents demand to be told what Dewey had been teaching the children, but then Ned, Patty, and the police arrive. Dewey is forced to admit his true identity and is immediately fired by Mullins.

When they arrive back home, Patty and Dewey clash while Ned intervenes on behalf. As the fighting dies down, Ned confesses that he misses playing music and hints that it was time that Dewey moved out. The following morning, the children decide to pick up Dewey and attend the competition, not wanting their hard work to go to waste. Patty notices that Dewey and the children have left, so she decides to notify Mullins, whilst an intrigued Ned decides to ttend the competition. Ned finally decides to leave Patty once and for all midrant. Mullins and the outraged parents attend the competition as well, arriving just as Dewey and the class take the stage as the School of Rock with "Teacher's Pet".

The School of Rock wins over the crowd, including the stunned parents. No Vacancy wins, but they are amazed by Dewey's new band. Upon leaving the stage, Summer meets several potential producers and the audience requests for School of Rock to perform an encore. A few weeks later Dewey and Ned open an after school program call the School of rock at their apartment to teach children how to play instruments, whilst Dewey and the band practice.