[1] In 1939, Wivern was recommissioned as the fleet mobilised because of deteriorating diplomatic relations between the United Kingdom and Nazi Germany and was selected for assignment to the 16th Destroyer Flotilla based at Portsmouth in the event of war breaking out.
[1] In October 1939, Wivern was transferred to the 16th Destroyer Flotilla under Commander-in-Chief, The Nore at Harwich for convoy escort and patrol duty in the North Sea.
[1] After completion of repairs, Wivern returned to service with her flotilla at Harwich in July 1940 to continue her convoy and patrol duties in the North Sea.
On 11 July 1940 she was attacked by German aircraft off Suffolk while escorting Convoy FN 19 near Aldeburgh Light, but she avoided damage by manoeuvering.
On 7 September 1940 Wivern and Wild Swan took part in Operation Rival, screening Cardiff and the light cruiser HMS Aurora as they patrolled off the coast of the Netherlands.
Wivern instead was retained for duty in the Western Approaches pending developments related to the hunt for Bismarck and took passage with Vansittart and Wild Swan to Portsmouth to await further orders.
[1] In March 1942, the civil community of West Hartlepool in County Durham "adopted" Wivern in a Warship Week national savings campaign.
[1] Wivern was still based at Gibraltar on western Mediterranean convoy escort duty on 22 February 1943, when she came to the assistance of the Royal Canadian Navy corvette HMCS Weyburn, which had struck a German mine and was sinking east of Gibraltar off Cape Espartel and was sinking at 35°46′00″N 006°02′00″W / 35.76667°N 6.03333°W / 35.76667; -6.03333 ("HMCS Weyburn sunk") with the loss of her commanding officer and 12 other members of her crew.
[1][2] In March 1943, Wivern was towed to the United Kingdom for repairs, and in April 1943 she was decommissioned at Plymouth and entered the Royal Navy Dockyard there for extensive repairs – including to her propulsion plant, which the explosion had lifted off its mountings – and a refit that included the replacement of her forward 4.7-inch (120-mm) with a twin 6-pounder British Army gun for use against motor torpedo boats.
[1] With her repairs and refit finally complete, Wivern underwent post-refit acceptance trials in September 1944 and recommissioned that month for assignment back to the Nore for service with the Harwich Escort Force.
In October 1944, she took up her duties at Harwich, which were focused on nightly patrols to counter the operations of German motor torpedo boats – S-boats, known to the Allies as "E-boats" – in the North Sea.
[1] Wivern was part of the escort of Convoy FS 56 on its voyage from Rosyth to the Thames Estuary on 14 March 1945 when the German submarine U-714 attacked, torpedoing and sinking the Danish cargo ship Magne off St. Abbs, Scotland, near the Firth of Forth.
As Wivern rescued Magne's survivors, the South African Navy frigate HMSAS Natal, a new ship that had left the River Tyne only four hours earlier bound for Scapa Flow in the Orkney Islands and then for antisubmarine warfare training at Tobermory on the Isle of Mull, arrived on the scene to assist.
A Royal Navy antisubmarine hunter-killer group led by the frigate HMS Ascension arrived and depth-charged the position, bringing more flotsam from the submarine to the surface.