It was Scottish born detective and spy Allan Pinkerton who is credited with inventing the mug shot. Pinkerton, who emigrated to the United States when he was 23, was Chicago's first detective, and later formed the Pinkerton National Detective Agency, which had as its motto "We never sleep".  The first mug shots were those featured on Wanted posters in the Wild West.

In 1882, Frenchman Alphonse Bertillon introduced the term anthropometry (Identification anthropométrique) to define his system for precisely measuring humans. In developing the system, Bertillon, whom Conan Doyle's character Sherlock Holmes described as "the French savant" in his book The Naval Treaty, dissatisfied with the random methods used to identify previously-arrested criminals, began taking measurements of inmates at the La Santé Prison in Paris in his spare time to jeers from both prisoners and fellow police officers. His system, Bertillonage, was the only scientific system used by police to identify criminals until fingerprinting was introduced. Bertillon also standardised the mug shot. He used metric photography to place an object, in this case the face of an offender head on and in profile, precisely within a defined space. A mat printed with metric frames was mounted along the side of the photographs.

Bertillon's obsession with classification led him to offer testimony as a handwriting expert in the trial of Alfred Dreyfus. The "long tissue of absurdities" (according to fellow witness Maurice Paleologue) which Bertillon offered as evidence that Dreyfus was guilty of treason was a significant contributing factor to the innocent Dreyfus' guilty verdict and subsequent lifelong imprisonment on Devil's Island.