Pinkerton was born in Glasgow, Scotland, to William Pinkerton and his wife Isabell, in 1819. The location of the house where he was born is now occupied by the Glasgow Central Mosque. A cooper by trade, he was active in the British Chartist movement as a young man. Pinkerton married Joan Carfrae (a singer) secretly before moving to America. Disillusioned by the failure to win universal suffrage, Pinkerton emigrated to the United States in 1842, at the age of 23.
In 1849 Pinkerton was appointed as the first detective in Chicago. In the 1850s, he partnered with Chicago attorney Edward Rucker in forming the North-Western Police Agency, later known as the Pinkerton National Detective Agency which is still running (but has been renamed) as a subsidiary of Securitas. Pinkerton's business insignia was a wide open eye with the caption "We never sleep." As the United States expanded in territory, rail transportation increased. Pinkerton's agency solved a series of train robberies during the 1850s, bringing Pinkerton first into contact with George McClellan and Abraham Lincoln.
Prior to his service with the Union Army, he developed several investigative techniques that are still used today. Among them are "shadowing" (surveillance of a suspect) and "assuming a role" (undercover work). Following the outbreak of the Civil War, Pinkerton served as head of the Union Intelligence Service in 1861–62 and foiled an alleged assassination plot in Baltimore, Maryland, while guarding Abraham Lincoln on his way to his inauguration. His agents often worked undercover as Confederate soldiers and sympathizers, in an effort to gather military intelligence. Pinkerton served several undercover missions under the alias of Major E.J. Allen. Pinkerton was succeeded as Intelligence Service chief by Lafayette Baker. The Intelligence Service was the forerunner of the U.S. Secret Service.
Following Pinkerton's service with the Union Army, he continued his pursuit of train robbers, such as the Reno Gang and also sought to oppose labor unions. In 1872, the Spanish Government hired Pinkerton to help suppress a revolution in Cuba which intended to end slavery and give citizens the right to vote.
In late June 1884 he slipped on a pavement in Chicago, biting his tongue as he did so. He didn't seek treatment and the tongue became infected, leading to his death on 1 July 1884. At the time of his death, he was working on a system that would centralize all criminal identification records, a database now maintained by the Federal Bureau of Investigation.
After his death, the agency continued to operate and soon became a major force against the young labor movement developing in the United States and Canada. This effort tarnished the image of the Pinkertons for years. They were involved in numerous activities against labor during the late 19th and early 20th centuries, including:
Many labor sympathizers accused the Pinkertons of inciting riots in order to discredit unions and justify police crackdowns. The Pinkertons' reputation was harmed by their protection of replacement workers ("scabs") and the business property of the major industrialists, including Andrew Carnegie.
Pinkerton was so famous that for decades after his death, his surname was a slang term for a private eye. Due to the Pinkerton Agency's conflicts with labor unions, the word Pinkerton remains in the vocabulary of labor organizers and union members as a derogatory reference to authority figures who side with management.
Pinkerton features in the last chapters of David Robertson's historical fiction novel "Booth". Pinkerton is portrayed as having Booth's diary reproduced so damnable evidence against notable legislators and former Vice-President and then current President of the United States Andrew Johnson, was eradicated. He then swore the forger, John H. Surratt, to secrecy.
Pinkerton produced numerous popular detective books, ostensibly based on his own exploits and those of his agents. Some were published after his death, and they are considered to have been more motivated by a desire to promote his detective agency than a literary endeavour. Most historians believe that Allan Pinkerton hired ghostwriters, but the books nonetheless bear his name and no doubt reflect his own views.