The film starts off with the end of the Wildcats' championship basketball game, where team captain Troy (Zac Efron) immediately rallies their spirits ("Now or Never"). With the teams' spirit raised, they win. Later, at Troy's after-match party at his house, Troy and Gabriella (Vanessa Hudgens) are seen thinking about their future and wishing that their last few months at East High wouldn't end ("Right Here, Right Now"). Meanwhile, Sharpay (Ashley Tisdale) meets Tiara Gold (Jemma McKenzie-Brown), a British exchange student who she hires to be her personal assistant.
Drama teacher Ms. Darbus (Alyson Reed) notices that since there were so few sign-ups for the spring musical, Sharpay decides to do a one-woman show. This alarms Kelsi (Olesya Rulin), who is writing the show, so she signs up almost everyone in the class for it instead. During several discussions, Ms. Darbus reveals that Sharpay, Ryan (Lucas Grabeel), Kelsi, and Troy have all been considered for a scholarship at Julliard School of the Arts, but only one of them is to be chosen. Sharpay becomes desperate to win the scholarship, and knowing that Kelsi writes the best songs, she gets Ryan to try and persuade Kelsi to give them the song ("I Want it All").
The very next day, Gabriella and Troy meet on the rooftop and teaches him how to waltz ("Can I Have This Dance"), and the two later rehearse for their musical with the song "A Night to Remember" after Chad asks Taylor (Monique Coleman) to go to prom with him. Meanwhile, Ryan walks in on Kelsi composing "Just Wanna Be with You" in the music room, and performs it with her, asking her to prom halfway through. While Troy and Chad (Corbin Bleu) reminisce about their youth ("The Boys are Back"), Sharpay and Tiara discover that Gabriella has a chance to go to college early. She later convinces Troy that he's the only thing keeping Gabriella from her dream. Troy talks to Gabriella about this over dinner, and after sharing an awkward goodnight, Gabriella ("Walk Away") leaves for college the next day.
Troy's dad, Jack, (Bart Johnson) talks to him and urges Troy to rethink his hobby for performing. Troy becomes angry, confused, and runs away, storming around East High confused (performing "Scream") until he finally screams at the top of his lungs on the theater stage. Ms. Darbus, noticing this, convinces Troy to rethink his hobby for basketball. Troy is confused, when he then gets a call from Gabriella who breaks up with him after telling him she loves him. On the night of prom, Troy visits Gabriella at Stanford University, and the two waltz again to "Can I Have This Dance" (reprise).
Back at East High, Troy tells Jimmie (Matt Prokop) to cover for him onstage as he and Gabriella wouldn't make it to the show on time. The Julliard representatives are there, and watch as the show seems to go well, (Senior Year Spring Musical). Jimmie, performing with Sharpay, causes her to lose the chance of going to Julliard. As Sharpay tries to impress the representatives, Tiara betrays her and steals Sharpay's act instead. Sharpay finally learns how it feels to be humiliated, but doesn't wish to go down. While Tiara performs, Sharpay immediately crashes her performance. During the final number, "We're All in This Together (Graduation Mix)", Ms. Darbus reveals that both Kelsi and Ryan got the Julliard scholarship. Troy decides he will go to Berkeley University, where he can play basketball and drama and is also 32.7 miles away from Gabriella, and the graduates respond by forming a giant wildcat before breaking out into song and dance ("High School Musical").
The six primary characters walk onto a stage from the field with the logo from the first film, the camera focuses on each of their faces, and they jump into the air in their signature pose one last time.