In May of 1962, Baltimore teenager Tracy Turnblad (Nikki Blonksy) prepares for school while displaying optimistic appreciation of her drab neighborhood in which she sees so much beauty ("Good Morning Baltimore"). Tracy, who has a passion for dance and bouffant hairstyles, is something of a social outcast among her classmates because of her chubbiness, but her best friend Penny Pingleton (Amanda Bynes) shares Tracy's obsession with the after-school dance program The Corny Collins Show, which features a group of teenage dancers known as the Council Kids and is sponsored by Ultra-Clutch brand hairspray. The show is broadcast live on Baltimore's WYZT station and, despite the progressive opinions of Corny Collins (James Marsden) himself, remains a segregated program featuring only white dancers except for the last Tuesday of every month, which is designated "Negro Day." Tracy and Penny rush to Tracy's house after school to watch the show ("The Nicest Kids In Town"), much to the annoyance of Tracy's mother Edna (John Travolta), who works from home as a laundress and refuses to leave the house because she is ashamed of her voluptuous size. Edna shows concern for her daughter's interest in dance, fearing that people will mistreat her because of her weight. Penny's paralyzingly strict mother Prudy (Allison Janney) also disapproves of The Corny Collins Show, but mainly due to her own racism and the fact that pop music is becoming more and more influenced by R&B styles.
Sharing Prudy Pingleton's disdain for "race music" is Velma Von Tussle (Michelle Pfeiffer), the manager of WYZT and domineering mother of the snobby, aggressive Corny Collins dancer Amber (Brittany Snow). Though Corny Collins defends his music choices and believes the show should be integrated, Velma refuses to consider it and constantly pushes for her daughter to be featured above all the other dancers. Several of the teenagers on The Corny Collins Show attend Tracy and Penny's high school, and Tracy in particular is star-struck and swoony whenever she catches sight of Link Larkin (Zac Efron), the show's main heartthrob and Amber Von Tussle's boyfriend.
Tracy is ecstatic when Corny Collins announces that one of their female dancers is taking a leave of absence (for "just nine months") and invites any interested girls to come to the station for an audition. Though Edna attempts to talk Tracy out of the idea, Tracy's father Wilbur (Christopher Walken), a joke-shop proprietor, is more supportive and encourages his daughter to go after her dreams. Tracy and Penny cut school the next day, and following a brief dance test,Tracy is dismissed by Velma Von Tussle due to her weight and her support of integration. Velma is blissfully detached during the audition process as she reminisces about her glory days as a pageant queen ("The Legend of Miss Baltimore Crabs").
Dejected, Tracy arrives back at school and is promptly given detention for cutting class. Her spirits lift, however, when she discovers that the detention room is where many of the school's black students congregate and dance to R&B music. She befriends Seaweed J. Stubbs (Elijah Kelly), the group's best dancer, whom she recognizes as a performer on the monthly Negro Day, and learns some of his dance moves. Link Larkin happens by the classroom door and sees Tracy's dance skills. Impressed, he enters the room and informs her that Corny Collins is hosting a hop, and that she is easily talented enough for Corny to select as a new Council member. As the school bell rings and the kids disperse, Link is accidentally jostled into Tracy, causing Tracy to have a series of euphoric daydreams about her interaction with him ("I Can Hear the Bells").
Teenagers, both black and white, arrive at Corny Collins' public dance, though the dance floor is divided by a rope for segregation. Link is performing a high-energy song ("Ladies' Choice"), and Tracy spots Seaweed among the black dancers. He tells her to borrow some of the moves he taught her, and impress Corny Collins. Tracy quickly catches the attention of Corny (and Link) with her dancing, and, to the horror of Velma Von Tussle, is chosen as the new Council member for The Corny Collins Show. Tracy's parents, as well as Penny and Seaweed, are delighted.
Negro Day arrives, hosted by Seaweed's mother, televison DJ Motormouth Maybelle (Queen Latifah). The biased station views, as well as the surprise of Tracy's admission to the Council, are echoed in a song written by the black dancers who are then chastised by Velma for performing it after the white dancers performed a cover version ("The New Girl in Town").
Tracy becomes a local celebrity and one of the most popular dancers on the show, despite Velma and Amber's disgust. Mr. Spritzer (Paul Dooley), the CEO of Ultra-Clutch hairspray, first dislikes Tracy and calls her a "chubby communist" after she announces on-air that, if she could, she would make every day Negro Day. Spritzer soon changes his mind when Tracy causes a huge boost in ratings and sales. Wilbur begins selling Tracy-themed merchandise in his joke shop, the Hardy-Har Hut, and Edna finally realizes that Tracy's weight did not prevent her from reaching her goal.Tracy soon receives an offer from Mr. Pinky (Jerry Stiller), the owner of a local plus-size dress shop, to be their official spokesgirl. Tracy is excited by all the sudden attention, but Edna suggests they should find an agent to take charge of Tracy's affairs. After much coercing, Tracy convinces Edna to be her agent, which at first terrified Edna because it would require her to be seen outside their house. Edna finally agrees to accompany her daughter to meet Mr. Pinky and go over a contract. Tracy assures her mother that times are changing, and that people who look different are finally beginning to be accepted ("Welcome to the Sixties").
After both Tracy and Edna receive makeovers at Mr. Pinky's shop, they stop at a diner to celebrate, with Edna feeling more confident than she had been in years. Amber and Velma enter the diner, and Tracy is forced to introduce them to her mother. Velma hurts Edna with a thinly-veiled insult about her new dress, reducing Edna to tears, but Tracy explains after the Von Tussles leave that Velma's motive for breaking them down is the threat that Tracy now presents to Amber winning the annual Miss Teenage Hairspray pageant the following month.
At school, Tracy is more popular than ever before, and students deliberately land themselves with detention slips just to see her after school. Link also becomes disenchanted with Amber's cruel pranks and gossip, and begins growing closer to Tracy. Tracy introduces Penny to Seaweed, and there is an instant attraction. Seaweed invites Tracy, Penny, and Link to a platter party at his mother's record store after school, and introduces them to his younger sister, Little Inez (Taylor Parks). Seaweed leads the black teenagers in expressing their individuality and spirit in the face of social prejudice ("Run and Tell That").
A lively party is underway at Motormouth Maybelle's record shop, with all of the Negro Day dancers in attendance ("Big, Blonde, and Beautiful"). Penny, Link, and Tracy are at first nervous, but soon enjoy themselves. Tracy and Link express similar views on the integration of The Corny Collins Show, and Link hints that he has chosen Tracy over Amber at last.
At the Von Tussle's opulent home, Amber sobs to her mother about losing Link to Tracy. Velma promises to make it all better, as she is in control of Link's singing career. In the meantime, Amber makes an anonymous call to Edna, ousting Tracy's current whereabouts, which causes Edna to rush over to Maybelle's shop and attempt to take Tracy home at once. Maybelle invites Edna to stay, enticing her with the enormous table of food, and Edna gives in. After asking Maybelle what the party is being held for, Maybelle sadly explains to Edna and all in attendance that Velma Von Tussle had officially cancelled Negro Day on The Corny Collins Show. Tracy, Penny, Link, Seaweed, and the dancers are outraged, and Tracy suggests that they stage a protest march on the WYZT studio. Maybelle wholeheartedly agrees, as do the dancers, but Link explains to Tracy that he is scheduled to sing in front of talent scouts at the upcoming Miss Teenage Hairspray pageant, and that participating in the march might damage his budding career. He apologizes with sincerity, but Tracy is terribly hurt.
With Edna and Tracy not yet home, Velma dons her sexiest dress and introduces herself to Wilbur Turnblad at the Hardy-Har Hut. Though her intention is to seduce Wilbur and be caught by Edna, likely leading to Tracy leaving the show, Wilbur only cares about peddling his precious joke items and remains impervious to Velma's advances. Edna and Tracy arrive home, and Tracy sadly goes to bed. Edna, invigorated by the food from Maybelle's party, spruces herself up and goes down to the joke shop in search of her husband ("Big, Blonde, and Beautiful Reprise"). Edna arrives to see Velma forcing Wilbur into a compromising position, and Edna storms out in fury. Back at their house. after changing the locks and sobbing for hours, Edna forbids Tracy from ever appearing on The Corny Collins Show again.
That night, Tracy visits her father, who is sleeping in the joke shop on a bed of whoopie cushions. He assures her that nothing happened between him and Velma, and that his only love is Edna. Tracy explains her fears about the future (though she makes no mention of the protest march), and Wilbur once again comforts her and encourages her to pursue what she knows is right.
Tracy returns to bed, and Wilbur reconciles with his wife ("You're Timeless to Me"). The following morning, Edna attempts to wake Tracy to tell her the argument is over, but find she has escaped to join the protest. Fearing for Tracy's safety, Edna sets out after her.
Tracy meets up with the protesters, who disperse picket signs among themselves and set off down the street, led by Motormouth Maybelle ("I Know Where I've Been"). Edna finally catches up and tries to talk Tracy into coming home, but Tracy refuses. They soon reach a police roadblock and are curtly instructed by a policeman to cease their protest. Tracy is angered by his rude treatment of Maybelle, and taps the officer with her picket sign when his back is turned. The officer immediately accuses Tracy of assault, and chaos ensues as he orders his men to arrest all the protesters. Tracy flees to Penny's house, and Penny secretly hides her in their basement fallout shelter until Prudy discovers them and calls the police on Tracy. Tracy is locked in the basement room while Penny is bound with a jump rope in her bedroom by her mother as punishment for harboring a fugitive. Soon afterwards, Seaweed climbs into Penny's room, frees her from her binds, and confesses his love. They break Tracy out of the basement window and escape by car. Link, feeling guilty for not supporting Tracy, visits the Turnblads, who are frantic with worry about Tracy's whereabouts. As he examines Tracy's bedroom, Link realizes his true feelings for her ("Without Love"). Once together again, the teenagers (along with Edna and Wilbur) concoct a plan to crash the Miss Teenage Hairspray pageant the next day.
Velma, knowing of Tracy's involvement with the protest, stations police around the studio the next day as the pageant begins. The security is shown pictures of Tracy and given explicit orders to prevent her from entering the building. The teenagers put their plan into action, infiltrating the studio and executing an elaborate trick to smuggle Tracy inside without the police realizing. Tracy arrives onstage just in time for the dance competition, and is joined by Link, who chooses Little Inez as his partner, no longer caring about the talent scouts in the audience, but rather about bringing The Corny Collins Show a step closer to integration ("You Can't Stop the Beat"). The phone-in votes increase dramatically after Inez's performance, and Inez is crowned Miss Teenage Hairspray, awarding her the position of lead dancer on the show, and officially integrating it at last.
Velma is furious, and is caught on camera admitting to her daughter that she rigged the pageant so Amber would be sure to win. She is immediately fired by Mr. Spritzer. As the celebratory finale dance reaches its pinnacle, Wilbur encourages Edna to take the stage herself, which she does with great enthusiasm. Penny and Seaweed kiss passionately, causing Penny's mother to have a fit of horror as she watches the pageant from home. Tracy and Link finally have their first kiss, as a better future begins to unfold around them.