At the outbreak of the Second World War, Horrocks was working as an instructor at the Staff College, Camberley, where he had taught since 1938. After helping organise a new, shorter, officer-training course, in December 1939 he was promoted to substantive lieutenant colonel. The following May, he was despatched to France to command the 2nd Battalion, Middlesex Regiment, a machine-gun battalion directly subordinate to the 3rd Division headquarters of Major-General Bernard Montgomery. British doctrine at the time retained heavy machine guns under the direct command of a corps or division, rather than as an organic part of subordinate formations. He joined the battalion during its retreat to Dunkirk, and after only 17 days had impressed his superiors sufficiently to be given the temporary rank of brigadier, and the command of 11th Brigade. The brigade's previous commander, Kenneth Anderson, had been promoted to General Officer Commanding (GOC) 3rd Division during the evacuation, when Lieutenant-General Alan Brooke, commander of II Corps, was recalled to the United Kingdom and Montgomery took over the corps. On Horrocks' return to Britain, he was given command of 9th Brigade and assigned to defend against a possible German invasion. A short stint as Brigadier General Staff of Western Command followed, before promotion to acting major-general and command of 44th (Home Counties) Infantry Division on 25 June 1941. He was promoted to substantive colonel on 28 May 1941 (with seniority backdated to 1 July 1940).