Originally, the drama teacher talks about doing cocaine with Whitney Houston's niece, but the line was changed after the death of Whitney Houston. The line had to be dubbed as "doing cocaine with Willie Nelson's horse".
While undercover, Jonah Hill's character's cover is almost blown by someone he knows personally, and he avoids this by pushing her away and saying that she tried to grab his private parts. This same exact thing happened to Johnny Depp's character in Donnie Brasco (1997) while he was undercover.
When Schmidt and Jenko go undercover as brothers, their last name is McQuaid. In the original TV show, Johnny Depp's and Peter DeLuise's characters would also go undercover as the McQuaid brothers in several episodes.
Every single scene that Johnny Depp's character Tom Hanson appears in, he is eating. This is a reference to the show where his character would be eating, sometimes several times during each episode, often in scenes of great importance to the plot.
While Jenko and Schmidt are being briefed on HFS there is a video sharing site on the computer. Two of the related videos in the sidebar were uploaded by users Chanchan and Brielar. These are references to Channing Tatum and Brie Larson.
In one scene the bad guys are actually watching the TV series 21 Jump Street (1987) on TV. While other original cast members show up in cameos in the film, Dustin Nguyen (Officer Harry Truman Ioki) does not. But he is worked into the film here as almost all the shots on the TV are of Ioki.
Throughout the film as the two main characters return to "The Chapel" they are confronted by 2 female officers who are ragging on them and touting their own exploits. Busting a prostitution ring, and busting up a chop shop run out of a High School auto shop. Both of these cases are clearly based on episodes (from season 1) of the old series in which they did infiltrate a modeling ring that was used for prostitution and a chop shop run out of the auto shop.
The drug Schmidt and Jenko go undercover to look for is abbreviated H.F.S., which stands for Holy F*cking Sh*t. This is (not coincidentally) the first phrase the teenager in the youtube video says when he takes the drug.
The trivia items below may give away important plot points.
Hanson (Johnny Depp) is seen in disguise as a biker eating a jar of peanut butter, based on a suggestion by Depp during his last season on the show. Penhall (Peter DeLuise), was also seen in disguise as a biker based on one of the character's attires in the original series. The disguised characters were written specifically for Depp and DeLuise by Jonah Hill.
At the end of the film it is revealed that one of the bad guys is actually Tom Hanson, played by Johnny Depp, from the original 21 Jump Street (1987) series. He has been undercover for years with the villains using the alias D.B. Following 21 Jump Street Johnny Depp played another cop who was long term undercover with criminals whose name was Donnie Brasco (1997) ... D.B.
When Schmidt and Jenko take HFS, Jenko remarks that it tastes like Cool Ranch. Soon after, they run into Coach Walters, who is carrying a bag of Cool Ranch Doritos. It is later revealed that Coach Walters is the mastermind behind HFS.