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.
All original cast members from the TV series have cameos in the film, except Dustin Nguyen. In one scene, the bad guys watch the original TV series on TV, and almost every shot shows Nguyen's character.
While Jenko and Schmidt are being briefed on HFS, a video sharing site is on the computer. Two of the related videos in the sidebar were uploaded by users Chanchan and Brielar, references to Channing Tatum and Brie Larson.
Throughout the film, as the two main characters return to "The Chapel," they encounter two female officers who tout their own exploits, including busting a prostitution ring, and busting 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 TV series, in which the cops infiltrated 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. It is also the first phrase the teenager in the Youtube video says when he takes the drug.
Before the end credits, a montage of various images are shown. One image shows a man (Stephen J. Cannell) at a typewriter. This is a reference to the famous Stephen J. Cannell Productions Productions typewriter logo, which was shown at the end of his TV productions. Cannell co-created 21 Jump Street (1987).
The trivia items below may give away important plot points.
Hanson appears in disguise as a biker eating a jar of peanut butter, based on a suggestion by Johnny Depp during his last season on the show. Penhall also appeared in disguise as a biker, based on one character's dress in the original series. Jonah Hill specifically wrote the disguised characters for Depp and DeLuise.
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 went undercover long term with criminals: Donnie Brasco (1997).
Johnny Depp's character, Tom Hanson, eats in every scene where he appears. Hanson ate often in the original TV series, sometimes several times during each episode, and did so often in scenes vital to the plot.
When Schmidt and Jenko take HFS, Jenko remarks that it tastes like Cool Ranch. Soon after, they run into Coach Walters, carrying a bag of Cool Ranch Doritos. It is later revealed that Coach Walters is the mastermind behind HFS.
When the two undercover DEA agents are gunned down, it actually conflicts with the original series episode 21 Jump Street: Back from the Future (1990) which features two elderly, retired officers reminiscing about past cases (Clip show episode).
There is a clue early on that Mr. Walters is connected to the synthetic drug H.F.S. When Jenko and Schmidt buy the drugs from Eric and subsequently ingest them, Jenko states that the drug tastes like barbecue sauce or cool ranch. Shortly after, the boys run into Mr. Walters in the hall as the drugs kick in. In this introductory scene to Mr. Walters, he is holding a bag of Cool Ranch Doritos.