Following the outbreak of First World War in 1914, Ogilvie was appointed as a scientific advisor to the Munitions Invention Department of the Ministry of Munitions.A.J. Hull, Passwords to Power, a Public Rationale for Expert Influence on Central Government Policy-Making: British Scientists and Economists, c. 1900 – c. 1925 (1994), p. 65. Doctoral dissertation. Available at http://theses.gla.ac.uk/1287/1/1994hullphd.pdf, accessed on 29 July 2015. In 1916, however, he assumed duties as Assistant Controller in that ministry's Trench Warfare Research Department, being formally appointed to do duty as a temporary Major in the Army (graded for purposes of pay as an Assistant Director at the War Office), with effect from 1 July 1916.Supplement to the London Gazette, 22 January 1917, p. 818. In 1917 he was re-deployed as Assistant Controller in the Chemical Warfare Department. He relinquished his Army commission on ceasing to be employed on military duties, and was granted the honorary rank of Major, with effect from 22 July 1918.Supplement to the London Gazette, 22 November 1918, p. 13714.
