Part of the 17th Brigade of the 6th Australian Division, the 2/7th Battalion opened its headquarters at the Royal Melbourne Showgrounds on 25 October 1939. It relocated to the newly-established camp at Puckapunyal on 3 November to carry out its basic training, and departed Melbourne for service overseas on 15 April 1940.
Arriving in the Middle East on 17 May 1940, the 2/7th conducted further training in Palestine and Egypt, before embarking on its first campaign – the advance against the Italians in eastern Libya – just before Christmas. It fought in the battles for Bardia (3-5 January 1941) and Tobruk (21-22 January 1941) and ended its activities in Libya manning defensive positions at Marsa Brega – the western extent of the advance.
In early April 1941, the 2/7th, with the rest of the 6th Division, deployed to Greece to resist the anticipated German invasion. For the 2/7th, the Greek campaign was essentially one long withdrawal through a series of rearguard positions, beginning on 16 April. The majority of the 2/7th were evacuated from Kalamata aboard the “Costa Rica” on the night of 26 April. On the afternoon of 27 April, however, the “Costa Rica” was crippled by German aircraft. The men of the 2/7th were rescued by a pair of British destroyers and landed on Crete.
On Crete, the 2/7th were initially deployed to defend the coastline around Georgioupolis but, after the German airborne landings on 20 May, were soon moved up to join the fighting around Canea. On 27 May the battalion took part in a wild bayonet charge at 42nd Street that temporarily rebuffed the German advance. The 2/7th subsequently played a critical rearguard role as the Allied forces retreated across the island to Sphakia. As a result, the battalion was left behind and taken prisoner after the withdrawal of the last evacuation vessels from Sphakia on 1 June.
Rebuilt in Palestine, the 2/7th formed part of the garrison in Syria between October and February 1941, before leaving the Middle East on 12 March 1942. Between mid-March and mid-July it formed part of a force defending Ceylon (present-day Sri Lanka) from possible Japanese attack, and did not disembark in Australia until 4 August 1942.
The 2/7th, as a whole, first met the Japanese in battle in the mid-January 1943 as part of the force defending Wau in New Guinea, although its carrier platoon had already been involved in fighting at Buna in Papua. Once Wau was made secure in early February, the 2/7th subsequently participated in the drive towards Salamaua. After arriving back in Australia on 6 October 1943, the battalion spent most of 1944 training in northern Queensland.
On 16 November 1944, the 2/7th disembarked at Aitape in New Guinea for its final campaign. Between January and June 1944, it was engaged mainly in arduous patrolling to clear the Torricelli Range, and in August it carried out a similar role in the Prince Alexander Range. The battalion returned to Australia on 18 December 1945 and disbanded at Puckapunyal in February 1946.