Allan was born in Dundee, the son of engineer James Allan. His father suffered financial failure, causing Allan to begin work as an apprentice at age 10. He emigrated to the United States, working for several years in Paterson, New Jersey, before returning to Glasgow. He began his professional career was as a steamship engineer in the early years of construction of these vessels and his business was the Scotia engineering works in Sunderland, England. He was also involved with a sea line, the Albyn Line. His early life included crew experience on steamships which were at one stage gun-running to America during the American Civil War, and he wrote of a number of dangerous escapades during this time.[2]
He was initiated into Freemasonry at Palatine Lodge No. 97, Sunderland, on 13th March 1890 and remained a member until his death in 1903.[3]
Allan had five sons and four daughters.[2] His son, Walter Beattie Allan, published a book which was an illustrated account of his life, for his grandchildren. William Allan published a number of books of traditional Scottish poetry.[citation needed]