During his time with the Royal Engineers, McNeile saw action at the First and Second Battles of Ypres—he was gassed at the second battle—and the Battle of the Somme. In 1916 he was awarded the Military Cross and was mentioned in dispatches; in November that year he was gazetted to acting major. From 1 April to 5 October 1918, he commanded a battalion of the Middlesex Regiment and was promoted to acting lieutenant-colonel; the scholar Lawrence Treadwell observes that "for an engineer to command an infantry regiment was ... a rarity". 18th Battalion, Middlesex Regiment under McNeile saw action for the remainder of his command, and were involved in fighting during the Hundred Days Offensive in the St. Quentin-Cambrai sector in September 1918; during the year, he was again mentioned in dispatches. On 2 October 1918 he broke his ankle and was briefly hospitalised, which forced him to relinquish his command of the regiment on 4 October. He was on convalescent leave when the war ended in November 1918. During the course of the war, he had spent a total of 32 months in France, and had probably been gassed more than once. His literary output from 1915 to 1918 accounted for more than 80 collected and uncollected stories. His brother—also in the Royal Engineers—had been killed earlier in the war.