James Ormiston McWilliam (1808–1862) was a Scottish naval surgeon, physician and writer on infectious diseases, best known as medical officer to the 1841 Niger expedition.
Brought up in Dalkeith, McWilliam became a licentiate of the Edinburgh College of Surgeons in 1827, and entered the Royal Navy in 1829 as assistant-surgeon. After serving abroad in this capacity for seven years, he was appointed surgeon to 'HMS Scout on the west coast of Africa.
McWilliam returned to England in November 1839, and attended the London medical schools and hospitals. He became M.D. of Edinburgh in 1840, and in September of the same year was appointed senior surgeon on board the steamer Albert, which joined the expedition sent to the River Niger for geographical and commercial purposes, and against the continuing Atlantic slave trade. The Albert and two other vessels left England on 12 May 1841, and entered the Niger on 18 August. On 4 September a malignant fever broke out in the Albert, and almost simultaneously in the other two vessels. The latter were sent back to sea filled with the sick and dying, leaving the Albert to continue the voyage alone.
By 4 October the Albert had also turned back, and was managed for some days by McWilliam and William Stanger, the other officers and crew being unable to take part in the work. In ten days they reached the open sea. A few days later McWilliam himself was taken ill. Out of 145 Europeans who took part in the expedition 130 went down with fever and 40 died; but among 158 Africans there were only 11 cases of fever and 1 death. McWilliam reached England on 19 November 1841.
After again serving two years afloat, McWilliam was sent on a special mission to the Cape de Verde Islands to inquire into the yellow fever which attacked the inhabitants of Boa Vista soon after the arrival of the HMS Eclair. In 1847 he was appointed medical officer to the custom house, a post he retained till his death.