Allen was commissioned in 1913 and joined the Australian Imperial Force (AIF) on 24 June 1915. Allen embarked for Egypt with reinforcements for the 13th Battalion in August. In March 1916 he was promoted to captain and assigned to the 45th Battalion. He arrived in France on 8 June 1916 and fought at the Battle of Pozières in August. Allen remained in the front line on the Somme into 1917 and led his men through the Battle of Messines in June. His leadership amidst heavy losses earned Allen the Distinguished Service Order and a promotion to major in July. He continued to lead men in combat, at the Battle of Dernancourt in April 1918, and then as an acting lieutenant colonel, in charge of the 48th Battalion, at Battle of Monument Wood.