John Murray, Doctor of Medicine (MD), served as surgeon to the military forces at the Cape of Good Hope from 1822 for many years and by 1833 was described as principal medical officer. During his stay at the Cape he played an active role in various professional and public institutions. In November 1825 he was appointed a member of the re-established Surpreme Medical Committee. In 1827 he was a member of the short-lived Cape of Good Hope Horticultural Society, and in 1832 was one of the directors of the Public Library in Cape Town. In December 1836 a medical committee was established for the Western Division of the Colony, with Murray as its president; however, it was not confirmed by the British government and never attained legal effect. Murray had made a special study of eye surgery and had much practice in it.
When the South African Institution - the first purely scientific society in southern Africa - was founded in June 1829, Murray was elected a member of its first council. The next year he became joint vice-president, a position he retained when the Institution amalgamated with the South African Literary Society in 1832 to form the South African Literary and Scientific Institution. He read two papers before the latter body. The first dealt with a case of femoral aneurism (4 December 1833), while the second was published under the title "Vaccination" in the South African Quarterly Journal (1834, Vol. 2(4), pp. 337-351). He also published an article entitled "Lock jaw" in the Cape of Good Hope Literary Gazette. His interests appear to have included natural history, for in October 1829 he exhibited a marine turtle, identified as Caretta imbricata, at a meeting of the South African Institution. When the Cape of Good Hope Association for Exploring Central Africa was formed in 1833 to organise an expedition into the interior led by Dr Andrew Smith*, Murray became a shareholder and was elected a member of the Association's management committee for several years. He offered to perform Dr Smith's medical duties in the country regions during the latter's absence on the expedition.