John P. Dunphy qualified as a member of the Royal College of Veterinary Surgeons (MRCVS) at the New Edinburgh Veterinary College in May 1900. During the Anglo-Boer War (1899-1902) he came to South Africa as a civil veterinary surgeon in the Army Veterinary Department. After the war he joined the veterinary division of the Transvaal Department of Agriculture in 1903. For some time he served as district veterinary surgeon at Krugersdorp. While there he reported on an outbreak of east coast fever at Utrecht, Natal, in 1905. However, he appears to have worked mainly with Arnold Theiler* and colleagues as a member of the field staff investigating stock diseases caused by poisonous plants. In 1906 he succeeded in poisoning sheep and goats with "Gifblaar" (Dichapetalum cymosum), confirming the toxicity of the plant. He also produced death in sheep and goats by feeding them "Slangkop" (Urginea burkei), thus providing the first experimental proof of its toxicity. His findings were published in "Report on experiments carried out to observe effects of certain poisonous plants on sheep and goats", in the Transvaal Agricultural Journal (1906, Vol. 4, pp. 315-323).
Dunphy became a member of the Transvaal Veterinary Medical Association in 1903, the year of its formation, but remained a member only to 1908. In 1910 he was one of a group of district veterinary surgeons who visited Onderstepoort for a refresher course. He appears to have left the civil service of the Union of South Africa in 1913. In September 1914, around the beginning of World War I (1914-1918) he was appointed as a temporary lieutenant in the (British) Army Veterinary Corps.
Dunphy was married to Agnes May Bevan, with whom he had two sons and a daughter.