Following the outbreak of the Second World War, Mainguy took command of  and then  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.
Following the outbreak of World War II, Mainguy took on key leadership roles, including command of  and then , before being promoted to captain and overseeing all Royal Canadian Navy (RCN) destroyer operations in Halifax in 1941. He was subsequently appointed acting commodore and commanded RCN destroyers in Newfoundland, followed by an appointment to Ottawa as Chief of Naval Personnel.