Born in Ulster, Allan grew up in Glasgow, working in a cotton mill from the age of twelve, then later serving an engineering apprenticeship.
However, before completing the apprenticeship, he married and moved to Liverpool, soon finding work with the Grand Junction Railway Company.
[1] In 1847, Henry Selsby, the secretary of the Old Mechanics, was arrested for supporting engineers who were on strike, and the following year he resigned, with Allan elected to take his place.
He joined the Reform League, attended the first Conference of Amalgamated Trades and first Co-operative Congress, was the treasurer of the Labour Representation League, and although he was initially suspicious of the Trades Union Congress, he soon came to support it, becoming treasurer in 1871.
[1] During the 1870s, Allan gradually became less active due to suffering from Bright's disease, but he remained in his posts until his death in 1874.