William Andrew Legg, son of William Legg, was articled to the Borough Water Engineer of Liverpool at the age of 16. He received his education at the Liverpool Institute and Queen's College, Liverpool, and was admitted as a member of the (British) Institution of Civil Engineers. He was employed on the construction of the "Vyrnwy" Waterworks for Liverpool during 1890-1899, also on the "Thirlmere" Waterworks for Manchester and the "Elan Valley" Waterworks for Birmingham. In August 1899 he came to the Cape Colony where he was employed in the irrigation works, water works and sewage operations of the Public Works Department. On 1 March 1905 he was appointed first assistant engineer in the Irrigation Department, from 1908 under F.E. Kanthack*. He still held this post by 1910. On 14 March 1908, aged 47, he married Florence S. Wheeler.
Late in 1902 Legg became a foundation member of the Cape Society of Civil Engineers and from the beginning served as joint vice-president (1903, 1905-1906) or member of council (1904, 1907, 1910). His paper on "Concrete" (August 1903) was only the second paper to be delivered before the society and was published in the first volume of its Minutes of Proceedings (pp. 17-21). In August 1905 he delivered "Notes on the stability of masonry dams", and a few years later, "Notes of Table Mountain rainfall, evaporation and run-off" (Minutes of Proceedings, 1909, Vol. 7). He was elected president of the society for 1909. Soon afterwards it changed its name to the South African Society of Civil Engineers. By 1913 he was still a member, but was living in London.
In 1903 Legg was a member of the South African Association for the Advancement of Science (founded in 1902) and was still listed as a member in 1910. At the association's annual meeting in Grahamstown in 1908 he delivered "Some notes on irrigation in Cape Colony", which dealt with matters such as the relationship between rainfall and run-off, methods of irrigation in use at the Cape, the silting of irrigation works, and the methods and cost of water storage. The paper was published in the association's Report (pp.76-86) for that year. A few years later he followed this up with a paper on "Irrigation in South Africa" (Journal of the Society of Arts, 1912). In 1905 he became a member also of the British Association for the Advancement of Science.