 Mayne became a cadet in the Royal Engineers and was commissioned as a second lieutenant in September 1918.Attending a training camp in Wales, he caught the Spanish flu, and was not fit to be sent to the front before the war ended.Mayne was demobilised on 24 December 1918, and attended Cambridge University from January 1919, having missed only the first term of his first year.