Allan Marshall was born at Mercer on the Waikato River, New Zealand, probably on 9 November 1851, the son of Charles Marshall, a trader, and his third wife, Tiramate, of Ngāti Pou. After developing an early interest in river vessels, he obtained his certificate of competency for river trade in July 1880 and served as master of the paddle steamer Waikato, which plied between Hamilton, the Waikato Heads and Onehunga. It is not known when or where Allan Marshall married, but his wife was Te Hauwhakaheke Te Kahotuanui and they had at least two children.
In 1886 the Wanganui River Steam Navigation Company appointed Marshall master of their only steamer, the Tūhua. This first attempt at opening up the Wanganui River for a commercial steamboat was a failure: the company was badly undercapitalised, the design of their vessel was widely criticised and two directors resigned. Marshall gave up regular captaincy three years before the vessel was wrecked near Moutere Island in 1890.
In 1891 Marshall took up a contract with the minister for public works to start clearing channels and removing snags to improve navigation as far upstream as Pipiriki. From 1 January 1892 this work was supervised by the Wanganui River Trust, which was created by the government to facilitate river navigation. On 18 December 1891 Marshall had captained Alexander Hatrick's first vessel, the Wairere, when it made its historic first run from Wanganui to Pipiriki, and he continued in this role from May 1892 when it commenced regular services to Pipiriki. He resigned in January 1893 because he preferred river channel work but piloted when required.
In 1895 he was appointed foreman in charge of works of the Wanganui River Trust. In 1897 he captained the inaugural voyage of Hatrick's vessel, the Ōhura. Designed to travel in the upper reaches beyond Pipiriki, it went as far upstream as the mouth of the Tangarākau River. By 1900 the Wanganui River had been snagged and channelled and training walls had been installed as far as Tangarākau. The Tangarākau River was proposed as a tourist route with coaches from Stratford meeting the vessels well up the tributary, and this was also snagged and channelled, partly under Marshall's supervision. However, a severe flood in 1904 destroyed all the work and the route was abandoned.
By 1903 the upper section of the Wanganui River had been channelled, and Hatrick started his regular Taumarunui to Wanganui service. In 1904 a massive unpowered houseboat, which was needed for accommodation, was winched from Taumarunui 29 miles down the river to Maraekōwhai under the skilled supervision and pilotage of Allan Marshall.
He continued to work hard for the Wanganui River Trust, although the next decade saw the gradual decline of the golden age of river travel. He developed much innovative river control and engineering work. In 1913 he produced a plan for the erection of 15 locks on the Wanganui River which he considered would allow seagoing vessels to travel up to Taumarunui.
Six feet four inches tall, with a 'powerful frame and self-possessed demeanour', Allan Marshall reputedly could do the work of three ordinary men. It was also said that 'he knew every inch of the river from its source to its mouth'. A popular man, his ability to settle disputes with Māori was valued by J. T. Stewart, chairman of the Wanganui River Trust. On 31 March 1915 he resigned because of ill health brought on by heavy work in all kinds of weather. He retired to his farm on a loop of the Wanganui River at Pēhimāhaki but was available for consultation by the trust. Here he died only four months later on 7 August, and was buried on a spur on his farm overlooking the Wanganui River. His grave, now marked by river stones and a wooden fence, is still visited by Wanganui River enthusiasts.