The son of a Presbyterian minister, James Marshall, and his wife Catherine Mary Richmond, daughter of Legh Richmond, he was born in Edinburgh, Scotland, on 19 December 1829. He lost his right arm as the result of an accident at the age of 16.
After taking a degree at Exeter College, Oxford he became a High Church Anglican minister in 1852 and was appointed curate in Trysull, near Wolverhampton. In 1854, he became curate at St. Bartholomew's Church, Moor Lane, in the parish of St. Giles, Cripplegate, London.
Marshall was received into the Roman Catholic Church in 1857 but never became a Catholic priest.
In 1863 he was appointed classical master at Birmingham Oratory School, where he became a friend of Cardinal Newman.
Marshall studied law and was called to the Bar at the Middle Temple in 1868. He practised law in Manchester where he helped to found The Catholic Times.
In 1873 he accepted an appointment in the British Colonial Service as Chief Magistrate and Judicial Assessor to the native chiefs in the Gold Coast, arriving there in July. On the breaking out of the Ashanti War in 1874, he secured the chiefs' assent to the impressment of their tribesmen, and was of great use throughout the campaign in raising levies. He made a good impression on the Ashanti people, who regarded him as a veteran general who had lost his arm in battle.
In 1874 Marshall left the Cape Coast and transferred, on his promotion to Puisne Judge, to Lagos, arriving there in January 1875.
He served as Chief Justice of the Gold Coast (now Ghana) from 1880 to 1882.
Marshall believed that the Gold Coast offered a very favourable environment for the return of Roman Catholic missionaries. In 1879 he asked the Office of the Propagation of Faith in Rome to provide missionaries. This led to the Society of African Missions transferring the pioneer French priests Auguste Moreau and Eugene Murat, both French nationals, from the Island of St. Helene station (South Africa Mission), to establish the Catholic Mission in the Gold Coast at Elmina and the creation of the Roman Catholic Church's Apostolic Prefecture of the Gold Coast.
Marshall played a significant role in enhancing the growth of the Roman Catholic Church in Lagos and was involved in preparations for the establishment of the Roman Catholic Church at Asaba, Nigeria.
He married Alice Young on 25 October 1877. They had a son (Bernard) and a daughter (Mary).
Marshall was awarded the Ashanti Medal by Queen Victoria in 1874 for his leadership role in the Ashanti War, and on his retirement in 1882 was knighted by the Queen as a Knight Commander of the Order of St Michael and St George.
Pope Leo XIII conferred on him the title of Knight Commander of St. Gregory the Great in 1889.
He died on 9 August 1889, aged 60, and was buried in the churchyard cemetery at St Mary Magdalen’s Roman Catholic Church Mortlake. His wife Alice died in 1926 and is also buried in the churchyard. There is a plaque inside the church in their memory. It was unveiled on 11 August 1999, 100 years after his death.
The Knights and Ladies of Marshall, a lay association of Ghanaian Catholics, visit the church in Mortlake annually to celebrate a mass in his memory.