The 540th Engineer Shore Regiment was activated at Camp Edwards on 11 September 1942, and was rushed to Europe to participate in Operation Torch. The 3rd Battalion was inactivated at Camp Edwards on 3 October; thereafter it had only two battalions. It staged at Camp Kilmer, New Jersey, and departed the New York Port of Embarkation and the Hampton Roads Port of Embarkation on 23 October 1942. It was redesignated the 540th Engineer Combat Regiment on 25 October 1942, and assaulted French Northwest Africa on 8 November. It subsequently participated in the assault landings at Licata, Sicily, on 9 July 1943, at Salerno and Anzio in Italy on 9 September 1943 and 22 January 1944 respectively, and the invasion of Southern France on 15 August 1944. It was redesignated the 540th Engineer Combat Group on 15 February 1945, with its 1st and 2nd Battalions becoming the 2832nd and 2833rd Engineer Combat Battalions. It was inactivated on 25 October 1945. The 2832nd Engineer Combat Battalion returned to Camp Kilmer on 13 November 1945, where it was disbanded two days later. The 2833rd Engineer Combat Battalion returned to Camp Kilmer on 26 November 1945, and was disbanded on the following day.