Having gained first class in his Honour Moderations exams, Ogilvie's studies were interrupted by the start of the First World War. He enrolled in the army two days after the announcement of war, joining as a second lieutenant in the 4th Bedfordshire Regiment. Posted to France, he sustained serious injuries in the Battle of Hill 60 in April 1915, losing his left arm. Despite his injury, he continued in military service, rising to the rank of captain by the time of his demobilization in 1919. He returned to Balliol and completed a modified version of his degree.