Morton Schmidt, portrayed by Jonah Hill, and Greg Jenko, played by Channing Tatum, are two former high school classmates whose paths cross once again at the police academy. In their youth, Schmidt was a chubby nerd obsessed with Eminem, while Jenko was an underachieving jock. Despite their different backgrounds, they form a close friendship as they help each other improve; Schmidt aids Jenko in his studies, while Jenko encourages Schmidt to engage in physical training. Upon their graduation, they become partners, but instead of the exciting roles they imagined, they're assigned to mundane park patrol duties.
Their luck changes when they apprehend a group called the One Percenters, managing to arrest their leader, Domingo, portrayed by DeRay Davis. Unfortunately, their case is dismissed due to Jenko's slip-up with the Miranda rights, leading to their reassignment to the now revitalized 21 Jump Street division. Here, they're introduced to Captain Dickson, played by Ice Cube, who informs them that their youthful appearances make them prime candidates for undercover work in high schools. Their mission: to track down a new synthetic drug linked to a major dealer.
Going undercover as brothers, they move in with Schmidt's parents and quickly find themselves entangled in a world of teenage drama. An identity mix-up sends Jenko to Schmidt's classes and vice versa, complicating their mission. They soon discover that the main dealer is a popular student named Eric, played by Dave Franco, although he is not the actual supplier.
During their undercover operation, Schmidt impressively befriends the popular crowd and develops a romantic interest in Eric's friend, Molly, portrayed by Brie Larson. Meanwhile, Jenko finds camaraderie among nerdy peers in his AP Chemistry class, catching the eye of their teacher, Ms. Griggs, played by Ellie Kemper. As they delve deeper into high school life, Jenko learns from his new friends about their secret eavesdropping activities on fellow students.
In a bid to gain Eric's trust, Schmidt throws a party at his house, giving them the chance to tap into Eric's phone. Disregarding Captain Dickson's orders against serving alcohol and drugs, they indulge in both and create chaos when Eric shows up at the party. Schmidt pretends to work for Eric, secretly planning to hand over the drugs to Captain Dickson. Tensions rise when they learn of a drug deal and discover that the supplier is none other than Mr. Walters, their P.E. teacher.
During a climactic prom night, they find themselves caught in a dangerous confrontation where stakes are raised. A gunfight breaks out involving Mr. Walters, the One Percenters, and the duo, leading to a dramatic rescue of Molly from a limo while attempting to stop Mr. Walters. In a thrilling turn of events, Jenko, sacrificing his safety, jumps in front of Schmidt and takes a bullet to save him, showcasing their strong bond.
Ultimately, Schmidt and Jenko successfully apprehend both Mr. Walters and Eric, and their friendship is strengthened through the trials they faced. Schmidt enjoys a reconciliatory kiss with Molly while both men are reinstated at Jump Street, where they receive a new assignment in college—bringing excitement for Schmidt but leaving Jenko less than thrilled.