At the outbreak of World War II he was a lieutenant-colonel in Military Intelligence, serving on the staff of the British Expeditionary Force. After evacuating from France he oversaw the raising of the 9th Royal Sussex Regiment and then commanded a brigade under Montgomery in a Home Service division.
In 1942 he took over command of 47th Infantry Division as a major-general, shortly thereafter commanding II Corps as the Army's youngest lieutenant-general. In 1943 he requested a field command, was reduced to major-general and posted to command the 1st Infantry Division in North Africa before commanding the 56th Infantry Division during the Italian campaign.
He briefly commanded the 6th Armoured Division before being severely injured by a land mine in mid-1944. He spent the rest of the war on intelligence duties in 21st Army Group HQ as well as briefly heading the German Directorate of the Special Operations Executive.
He served as Director of Military Government in Germany during the Allied occupation after World War II. He first came to public notice after firing the mayor of Cologne, Konrad Adenauer, for "laziness and inefficiency".
Templer famously remarked that, "The answer [to the uprising] lies not in pouring more troops into the jungle, but in the hearts and minds of the people. He demanded that newly built villages, where ethnic Chinese were resettled away from the jungles and beyond the reach (and influence) of the guerrillas, look inviting. To further gain the "hearts and minds" of the non-Malays, who were the main source of communist support, Templer fought to grant Malayan citizenship to over 2.6 million Malayan residents, 1.1 million of whom were Chinese. Templer sought "political and social equality of all" Malayans (contrast with post-independence Ketuanan Melayu).
He instituted incentive schemes for rewarding surrendering rebels and those who encouraged them to surrender.
He also used strict curfews and tight control of food supplies to force compliance from rebellious areas and flush out guerillas. Crops grown by the communists in response to these measures were sprayed with herbicide. These restrictions would be lifted on so-called White Areas which had been found to be free of communist incursion.
In military terms Templer concentrated his efforts on intelligence. When he left Malaya in 1954 the situation was dramatically improved, though the rebels remained a force. Templer denied that the situation had stabilised, declaring "I'll shoot the bastard who says that this Emergency is over". The Malayan government eventually declared the Emergency over in 1960.