Allan Pinkerton's ancestors lived on the east coast of Scotland in the early 1600s. His branch of the family has been traced back to Allayne Pinkerton, a blacksmith, living in the Gorbals, a particularly rough neighborhood on the edge of Glasgow. One of Allayne's decendents, William Pinkerton married Isabella McQueen in about 1812. (It was William's second marriage.) On July 21, 1819, Isabella gave birth to their fourth child, Allan. The Gorbals was a difficult place to grow up. Heavy Irish immigration caused ethnic problems, the economic situation was dire, and technology was changing the textile industry. Hand processes were giving way to mechanized production and extensive unemployment followed. Public discontent welled up and resulted in a series of disorders. At the turn of the century William was employed at the Glasgow City Gaol. Exact information is unavailable, but it would appear that William died around 1830 when Allan was still a young child. Allan received some schooling prior to his father's death, but from then on had to go to work to help support his family. His first job was as an errand boy, but at age twelve he apprenticed as a cooper. On December 26, 1837. he received his journeyman's card as a member of the Coopers of Glasgow and Suburbs Protective Association.
The first decades of the nineteenth century saw a slight improvement in the economy, but public unrest in Glasgow continued. On May 21, 1838, work came to a stop in and around Glasgow as tens of thousands of protesters demonstrated peacefully. Allan participated and was greatly influenced by the radical speakers that addressed the crowd. London did not respond to the protest and public enthusiasm faded. The leadership of the protest that continued beneath the surface became known as the Charterist movement. Allan became a devoted Charterist organizer. He had lost his permanent employment and was taking a succession of temporary jobs which required him to move about frequently. During this period he joined the Glasgow Universal Suffrage Association and was elected to the Central Committee of the Charterist Movement in Scotland. Allan argued for direct action and participated in the Newport Rising on November 4, 1839. Government forces quickly quashed the uprising. Two leaders were hanged and sixty-two others were transported to Australia. Allan managed to escape. In a subsequent meeting he resigned from the Universal Suffrage Movement and on December 4, 1840, formed the Northern Democratic Association. He continued to agitate, but the general public was largely apathetic.
In 1841 the economy of Glasgow took a sharp downturn and emigration increased dramatically. Allan appears to have decided that he would not be able to accomplish his political goals in Scotland and decided to join the exodus to North America. He might also have feared that he risked arrest if he remained in Glasgow. On March 13, 1842, Allan married Joan Carfrae in Glasgow. On April 8 they boarded ship and the next morning sailed for Montreal, Canada. Their ship was wrecked off Sable Island two hundred miles southeast of Halifax and they were robbed by Indians of everything that they still had when they finally reached shore. They were subsequently picked up by another ship and taken to Halifax before going on to Quebec and finally to Montreal. Allan got a job making barrels, but after a few months decided that he didn't want to settle in Canada. They moved on to the United States. They settled first in Chicago where Allan built barrels for a few months and then moved to Dundee, Illinois, where Allan established himself as the village cooper. In June 1846 Allan accidentally discovered a site where counterfeiters were working. He assisted the sheriff in making the arrest and was an instant celebrity in Dundee. A short time later he was commissioned by local businessmen to help catch another counterfeiter. During this time he also became involved in the "Underground Railroad" and helped fleeing slaves escape to Canada.
In 1847 Pinkerton stood for election for the position of sheriff of Kane County on the Abolitionist ticket. The leader of the Dundee Baptist Church opposed Pinkerton and he was defeated in an acrimonious campaign. In the fall of 1847 the Cook County Sheriff, William L. Church, offered Pinkerton a job as his deputy. Pinkerton accepted, gave up his business in Dundee and moved to Chicago. In 1849 Mayor Levi D. Boon, moved Pinkerton to the Municipal Police Department and made him the department's first detective. Boon, a member of the Democrat Party, was opposed to the Abolitionist cause. In 1850 Pinkerton left the police force saying that it was because of "political interference." Pinkerton then went to work for the United States Post Office where he investigated recent incidents of mail theft. He managed to catch the culprit and recover part of the stolen money. The case became a sensation in the press when it was discovered that the thief was related to the Chicago Postmaster. At about this time Pinkerton went into partnership with Edward A. Rucker, and formed the North-Western Detective Agency. Rucker appears to have dropped out within a year or so. Pinkerton adopted the motto "We Never Sleep" and a human eye as his logo - hence the term "private eye." At the time law enforcement in the United States was largely a county affair and the emphasis on state's rights made it difficult to pursue outlaws across county and state lines. As a private entity the North-Western Detective Agency pledged to cooperate with local authorities, but also intended to operate across the entire country. It was a first.
In the 1850s Pinkerton took on a number of railroad companies as clients and as various express companies were formed they too were added to his client list. He met Abraham Lincoln while both were working for the Illinois Central Railroad - Lincoln as a lawyer and Pinkerton as a security expert. One of Pinkerton's more important railroad clients was George Brinton McClellan, then president of the Ohio and Mississippi Railroad's Eastern Division. In 1857 Pinkerton's agency solved a particularly important counterfeiting case that brought him to the attention of the New York banking community. As new technology came into being Pinkerton was quick to apply it to his business. The railroad, the telegraph and photography were effectively incorporated into his operations in the middle of the nineteenth century. In 1860 he organized his first guard service for the meat-packers along the Chicago lakeshore. All during this period he continued his activities in the Underground Railroad and maintained close ties with several Abolitionist leaders including John Brown. After Brown was captured at Harper's Ferry, Pinkerton raised money for his defense fund and did everything that he could to secure his release. Some believe that he even contemplated attempting to break Brown out of prison by force. Lincoln was elected in November 1860 and on December 20 made a speech in which he stated that he was opposed to permitting slavery to be extended into any new territories that had not yet attained statehood. On December 21, South Carolina formally seceded from the Union.