In 2005, Morton Schmidt and Greg Jenko were polar opposites in high school. Schmidt did well in school, but his geekish personality made it hard to him to gain acceptance among his peers. Jenko was a jock with plenty of friends but had poor grades. Seven years later, the duo join the police force and they become friends. The duo finally catch a break when they are assigned to go undercover as high school students and halt the spread of a synthetic drug that many students are getting their hands on and catch the supplier. After their identities are inadvertently mixed up, Schmidt finds himself among the popular kids, including the school's main drug dealer, while Jenko finds himself ostracized and frowned upon by most of the students. Schmidt's attempts to make something of himself leads to a rift with Jenko and threatens to derail the entire operation. Can they get their act together before the synthetic drug spirals out of control?