Following the outbreak of the Second World War, Mainguy took command of HMCS Assiniboine and then HMCS Ottawa before being promoted to captain and taking overall command of Royal Canadian Navy (RCN) destroyers in Halifax in 1941. In 1942 he was appointed acting commodore and took command of RCN destroyers in Newfoundland, quickly followed by an appointment to Ottawa as Chief of Naval Personnel.[1] He returned to active duty as the commanding officer of HMCS Uganda in 1944. As a part of British Pacific Fleet, Uganda took part in the Okinawa campaign.[1][2]
Mainguy retired from the Royal Canadian Navy in 1956 as a vice-admiral.[1] In retirement he was president of Great Lakes Shipping until 1965.[3] He died in 1979.[3]