It was originally Terry Crews who started saying "NINE NINE!" on set to help motivate other cast members. The writers liked this very much so they decided to add it into the series.
Andy Samberg (Peralta) and Chelsea Peretti (Linetti) went to the same elementary school, just as their characters had in the series.
After shooting each scene a few times verbatim, the actors then shoot a few more when they improvise to make the scene funnier if possible. This method is also used on Parks and Recreation (2009), co-created by this show's co-creator Michael Schur.
In an early episode, Terry Jeffords (Terry Crews) has to sketch the description of a criminal, due to the normal sketch artist calling in sick. This actually happened to Terry Crews in real life, where he got his first job in the local news station as a sketch artist due to the regular artist calling in sick.
Chelsea Peretti originally auditioned for the role that eventually became Detective Rosa Diaz. Though she did not get that part, the character Gina Linetti was then created for Peretti.