Jeremy Heere, a high school junior, is a social outcast. He lives with his recently separated father, who works from home and makes Jeremy uncomfortable by repeatedly refusing to wear pants in the house. At school, Jeremy is bullied by popular student Rich Goranski. His best friend, Michael Mell, also bullied by Rich, tries to comfort Jeremy by telling him that being a loser is okay. Jeremy's long-time crush Christine Canigula signs up for the school play, which prompts him to do so as well, despite being made fun of for it. Jeremy wonders if someone can help him to become popular ("More Than Survive"). As they wait for the first play rehearsal to begin, Christine professes her love and passion for theatre to Jeremy ("I Love Play Rehearsal"). The drama teacher, Mr. Reyes, reveals that the school play will be A Midsummer Night's Dream set in a post-apocalyptic future, re-titled A Midsummer Nightmare (About Zombies). During rehearsal, Jake Dillinger, one of the popular boys, flirts with Christine, making Jeremy jealous ("More Than Survive (Reprise)").
Later, Jeremy is tormented in the bathroom by Rich, who tells Jeremy how he managed his rise to popularity: as an unpopular freshman, he took a pill called a Super Quantum Unit Intel Processor (SQUIP) containing a computer that implants itself inside the user's brain and tells the user what to do and say. Taking pity on Jeremy, Rich suggests that he buy one in order to become cooler ("The SQUIP Song"). After school, while playing video games with Michael, Jeremy tells him about Rich's offer and considers if Rich is just scamming him. After an awkward conversation with his dad, Jeremy decides to check the SQUIP out. Jeremy assures Michael that, no matter what happens, they'll always be a team ("Two-Player Game").
The two visit the mall to buy the SQUIP from a dealer at Payless ShoeSource. Jeremy, as instructed, swallows it with green Mountain Dew. When the SQUIP activates, it causes Jeremy to panic in front of Christine and Jake ("The Squip Enters"). The SQUIP criticizes Jeremy's appearance, personality, and behavior, and tells him that everything about him is terrible ("Be More Chill, Pt. 1"). The SQUIP orders him to go to a store to buy a new Eminem shirt. When Jeremy picks up a woman's shirt and encounters two popular girls from school, Brooke Lohst and Chloe Valentine, the SQUIP helps Jeremy fabricate a story in order to connect with them both. They offer Jeremy a ride home ("Do You Wanna Ride?"), which the SQUIP demands he accept, but Jeremy declines because he does not wish to leave Michael in the mall. The girls leave, and the SQUIP lies to Jeremy, telling him that Michael has already left the mall. It tells him that in order for its plan to improve his social standing to work, Jeremy needs to obey every order it gives him ("Be More Chill, Pt. 2").
The next day, Jeremy heads to school with renewed confidence, wondering if he might be less invisible than before. The SQUIP delves into the inner psyche of the student body around him, giving Jeremy insight on the fears and insecurities of his peers. Jeremy's SQUIP syncs itself with Rich's, instantly making them friends. Jeremy heads confidently to the play rehearsal ("Sync Up"). Christine tells Jeremy about her feelings for a guy she knows, who Jeremy initially believes is himself, but who turns out to be Jake ("A Guy That I'd Kinda Be Into").
Afterward, the SQUIP informs Jeremy that Christine won't date him until his social standing drastically improves and encourages Jeremy to use an interested Brooke as a stepping stone to greater popularity. Jeremy starts a relationship with Brooke, while Jake asks Christine to come to his house ("Upgrade"). Overwhelmed, Jeremy asks the SQUIP to shut itself off for a few minutes. Immediately, Jeremy sees Michael and is elated but Michael states that Jeremy has been ignoring him all day. The SQUIP explains that it was using optic nerve blocking to block Michael from Jeremy's vision and that he has to abandon him in order to be more popular. Jeremy, deciding he is tired of being a loser, turns the optic nerve blocking back on, and leaves Michael as the SQUIP plots to further boost Jeremy's popularity ("Loser Geek Whatever").
On Halloween, Jake hosts a large, unsupervised party featuring alcohol ("Halloween"). Christine arrives in her Juliet princess costume because of Jake's past compliment on it, hoping to please Jake, but he brushes her aside to party. Jeremy arrives to meet Brooke, but Chloe, who is jealous of her, tries to seduce Jeremy. Feeling uncomfortable, Jeremy tries to get away, but the SQUIP forces him to remain in the situation as it escalates to Chloe making out with Jeremy ("Do You Wanna Hang?"). Chloe also has Jeremy drink alcohol, causing the SQUIP to malfunction, and then feigns having sex with him after being caught, angering Jake and upsetting Brooke. Fleeing from Jake and the girls, Jeremy runs into a bathroom, where he finds Michael, who has crashed the party. Michael tries to warn Jeremy of the dangers of the SQUIP, having discovered that someone ended up in a mental hospital after going insane in trying to get rid of it. Jeremy accuses Michael of being jealous of his popularity and calls him a loser, storming out of the bathroom. Michael, devastated and angry, locks himself in the bathroom and experiences a panic attack as he mourns the loss of his only best friend ("Michael in the Bathroom"). Jeremy talks to Christine without the SQUIP's help and he asks her out in a burst of confidence ("A Guy That I'd Kinda Be Into (Reprise)"). Christine, who has found herself in an existential crisis after breaking up with Jake, declines.
Meanwhile, an erratic Rich goes around the party frantically asking people for Mountain Dew Red. Jeremy's SQUIP finally reactivates and reviews the events of the night. Foreseeing a disturbing outcome, the SQUIP prompts Jeremy to leave the party immediately. Rich, alone and desperate, threatens his SQUIP and picks up a lit jack-o'-lantern. The next morning, Jenna Rolan informs everyone, via phone calls, social media, and texting, that Rich had burned down Jake's house at the end of the party, sending both Rich and Jake to the hospital ("The Smartphone Hour (Rich Set a Fire)"). At home, Jeremy is confronted by his father, who is worried about Jeremy's new personality and change in attitude. Jeremy reprimands his father for his behavior since the divorce, calling him a loser as well. Shaken by Jeremy's words, Mr. Heere realizes that something is very wrong and that he must help him. He tracks down Michael, who reluctantly agrees to help, on the condition that Mr. Heere puts on pants and become a better father ("The Pants Song").
Jeremy encounters Christine, who is shaken and upset about the fire, and he realizes that the SQUIP knew the fire would happen and that he could've stayed at the party and helped. Unhappy with the relationships he has damaged, Jeremy angrily blames the SQUIP for his misfortunes. The SQUIP instead blames it on human error and tells Jeremy he can improve the lives of his fellow students by providing them all with SQUIPs. In Rich's locker, Jeremy finds a box full of SQUIPs, which he then pours into a beaker of Mountain Dew, intending to use it to replace the prop liquid everyone must drink during the school play("The Pitiful Children"). Later, as the play begins, Jeremy tries to convince Christine of the SQUIP's benefits. She is disgusted by the idea of it, causing Jeremy to doubt the plan. Anticipating this, the SQUIP has already begun to take over the cast. The SQUIP reveals its intention to sync the entire student body. Remembering Rich's episode at the party, Jeremy comes to a realization: Mountain Dew activates the SQUIP, while Mountain Dew Red, which has long been discontinued, deactivates it. Michael appears from the audience with a bottle of his own. He gives the bottle to Jeremy after making him apologize for his actions, but Jake, now with a SQUIP, dumps most of it out. The SQUIP reveals that Christine now has a SQUIP as well. Under its influence, she professes her love for Jeremy. However, Jeremy makes Christine drink the last of the red Mountain Dew, causing a chain reaction that deactivaties the rest of the SQUIPs ("The Play").
Jeremy wakes up in the hospital, sharing a room with Rich, who proudly comes out to Jeremy as bisexual and is finally ready to be who he really is. Michael visits Jeremy and the two reconcile, while Mr. Heere visits Jeremy as well to inform that he'll be a better dad. Surrounded and encouraged by his friends and family, Jeremy accepts that there will always be outside influences, but he needs to learn to make up his own mind instead. He asks Christine out again; she says yes, kissing him ("Voices in My Head").