Allan was born in Alloa, on the Firth of Forth, and attended the Foulis Academy in Glasgow for seven years. In 1767 he moved to Rome, where he lived for ten years; this was the most successful period of his life. In Rome, Allan painted ambitious historical pictures, portraits, caricatures and genre scenes. On returning to London in 1777, he spent two years trying to establish himself. Unsuccessful and ill, he returned to Scotland where he specialised in painting family groups. He also produced book illustrations and was appointed the master of the Trustees' Academy at Edinburgh.