William was educated at Fermay College, and at Trinity College, Dublin, qualifying L.R.C.P.& S.I. and L.M. in 1871
He took up a commission within the Medical Services, at the rank of Surgeon, on 30th March 1872. From 1878 to 1880 he saw active service in the Afghan War, then in 1881 served in the Boar War, taking part in the Chitral Relied Force on the North-West Frontier in 1895. For his service he was Mentioned in Despatches and received the medal with clasp. During this time, on 30th March 1884, he gained promotion to the rank of Surgeon Major. On 30th March 1892 he was promoted again to Lieutenant Colonel, then in 1895 returned to Chitral. On 24th June 1896 he began to serve under the rank of Brigadier Surgeon Lieutenant Colonel but was granted a temporary rank of Colonel whilst Principal Medical Officer to the Cavalry Division in South Africa on 22nd October 1899. During his war service in South Africa he took part in operations in the Transvaal, the Orange River Colony, and Cape Colony, including the relief of Kimberley and the actions of Paardeberg, Poplar Grove, Dreifontein, Karee Siding, Zand River, Johannesburg, Pretoria, Diamond Hill, Riet Viel, Belfast and Colesberg. For his service there he was Mentioned in Despatches (1901); was appointed Companion of the Order of the Bath (1901); and received the Queen’s South African Medal with six clasps and the King’s South African Medal with two clasps. On 4th October 1901 he gained promotion to the rank of Colonel, then on 2nd December 1904 he was promoted again to the rank of Surgeon General. He returned to South Africa, as Principal Medical Officer, in 1905, remaining there until 1908. He then served in the Northern Command from 1908 to 1909. On 17th November 1909 he retired.
At the outbreak of war he was re-employed, and took up the appointment of Deputy Director of Medical Services for embarkation duties, Southampton from 25h August 1914 His duties involved handling all the sick and wounded men who arrived at that port, and allocating and dispatching them to the various hospitals having available beds. He also had to make up the ambulance trains from the reports received - during the period involving the Battle of the Somme in 1916 he dispatched as many as 185 trains in 7 days. He directed the sick and wounded from Southampton from 1914 until September 1917, when his office transferred to London. In April 1917 the grade of his appointment was raised to Director of Medical Services. Also in 1917 he was appointed Knight Commander of the Order of the Bath, as well as the rank of Commander of the Crown of Belgium. When William died a requiem mass was celebrated at Holy Trinity Church, Brook Green on 3rd August. He was the was the son of Staff Surgeon James Donovan, R.N; and the husband of Anne who died in 1925 - married in 1909, and later Annie Bocher - married in 1931.