William Barrett Marshall was appointed Assistant-Surgeon in the Royal Navy on 10 June 1824.
In 1832 he was employed as assistant-surgeon on H.M.S. Dover moored in the River Thames.
He contributed correspondence to the Lancet regarding the reported circumstances of cholera on the Dover.
An outbreak of cholera on the convict ship Fanny
in 1833 was attributed by the surgeon Francis Logan
to a last minute drunken sailor from Blackwall. It raged through the already debilitated female convict population, before the Fanny had even departed England's shores. William Marshall of H.M.S India was placed on board the Fanny as an additional surgeon in case the outbreak could not be contained. Many women became ill, six dying before the disease eased its grip. The women, already weakened were then susceptible to scurvy and the surgeons had the problem of being unable to administer nitre to combat complications from scurvy as the women could not keep it down. The surgeons insisted on putting into the Cape where fresh provisions were found for the women. This assisted in their recovery however unexplained fevers also broke out on the ship
William Marshall was appointed surgeon to H.M.S. Alligator in 1834.
He spoke at the 14th anniversary of the Van Diemen's Land Auxiliary Bible Society at the Court House in Hobart in January 1834. The Hobart Town Courier thought he was the most eloquent speaker of the evening, who though yet a young man, whose studies had been mainly devoted to the medical profession, was evidently a divine of no mean acquirements
He was surgeon on the Alligator when that vessel was sent to rescue the wife and child of the captain of a whaling vessel who were said to be held captive by Maoris. The rescue mission turned violent and William Marshall later wrote of the situation in A Personal Narrative of Two Visits to New Zealand in His Majesty's Ship Alligator in 1836
1). Tears for Pity, a volume of poetry in 1824. - Monthly Review
2). His article on Medical Education
was published in the Lancet in 1827
3). Correspondence of William Barrett Marshall of H.M.S. Soudan on the benefits of Vaccination for Smallpox in Africa (1841)
4). Nosological Report, for the Town of Fremantle, W.A. from the commencement of the colony in 1828 to December 1833 and Extract from the Journal of W.B. Marshall on Norfolk Island by William Barrett Marshall - Medico-Chirurgical Review
 The Lancet