Originally destined for the US Navy as a turbo-electric (TE) type Buckley-classdestroyer escort, HMS Aylmer was provisionally given the name USS Harmon (later this name was reassigned to USS Harmon (DE-678), though the delivery was diverted to the Royal Navy before the launch. Its commanding officers were Lt Cdr A.D.P. Campbell RN and Cdr B.W. Taylor RN (Senior Officer 5th Escort Group) on 30 August 1944 and Lt Cdr W.L. Smith RNR in February 1945.
HMS Aylmer was adopted by the Boy's Own Paper. The May 1945 issue had pictures of HMS Aylmer in the graving dock in Liverpool after she had rammed and sunk U-1051 off Anglesey. In the May 1946 issue, C.J. Olivant (the author of the article) described the war service of HMS Aylmer.
She was stationed in Belfast for the duration of her wartime service with the 5th Escort Group.
During Operation Goodwood, on 22 August 1944, the escort carriers HMS Trumpeter and HMS Nabob sailed to the Barents Sea to attack the German battleship Tirpitz. During this operation HMS Nabob was torpedoed and ten minutes later the destroyer escort HMS Bickerton (commanded by Cdr Donald MacIntyre, senior officer of the 5th Escort Group) was also hit by an acoustic torpedo (Gnat); both attacks were by the submarine U-354. HMS Nabob was able to raise steam and was escorted back (at an average 10 knots (19 km/h)) to Rosyth where she was considered a constructive total loss and used as spare parts. HMS Bickerton was sunk by HMS Vigilant as any salvage was considered too risky. Vigilant had to fire three torpedoes to sink Bickerton. As a result of this action, Cdr Donald MacIntyre transferred his command to HMS Aylmer.
On 26 January 1945, the submarine U-1051 was sunk in the Irish Sea south of the Isle of Man, at position 53°39′N05°23′W / 53.650°N 5.383°W / 53.650; -5.383 by the frigates HMS Aylmer, HMS Bentinck, HMS Calder and HMS Manners. U-1051 was forced to the surface by the use of depth charges, then a gun battle ensued with U-1051 finally sinking after it had been rammed by HMS Aylmer. This action resulted in the loss of all hands (47) from the crew of U-1051. It is entirely clear that the ramming of U-1051 by HMS Aylmer was intentional and that Cdr B.W.Taylor was not removed from command, as has been suggested, shortly after this incident. A reading of the after-action report makes it clear that the U-1051 was still a belligerent submarine (during the attack by the escorts, U-1051 fired another torpedo at HMS Aylmer). When she surfaced, U-1051 was fired on by HMS Aylmer, HMS Calder, HMS Bligh and HMS Bentinck. It is known that the 3-inch/50 caliber main gun of the Captain class had trouble penetrating the hull plating of German submarines (their shells would bounce off the submarines they fired on), so it is possible Commander Taylor thought that discretion was the better option and rammed the submarine as the ship's "Elephant Guns" had little effect; however in doing this he would have been acting against Admiralty orders that ships were not to ram submarines except in dire circumstances.
The 46-page report in ADM 217/752 held in The National Archives completely vindicates Commander Taylor. At paragraph 8 of the Staff minute written by Captain J.T. Borrett, Captain (D) Belfast and attached to the proceedings of HMS Grindall says:
It is noted that on surfacing no immediate attempt to evacuate the U-boat was observed. The only damage to be seen was to the conning tower, which if resulting from the Hedgehog attack, could not have been considered lethal. It is thought quite possible that the U-boat surfaced through faulty trim resulting from confusion in the boat caused by the Hedgehog explosion. From experience decisive results from 3-inch gunfire against the U-boat's hull could not be expected and the U-boat might well have regained control and dived again with a possibility of escape. Added to this HMS Calder was in imminent danger from torpedo attack. Having regard to these circumstances, it is considered that the decision made by the commanding officer of HMS Aylmer to ram was entirely correct and its execution was faultless.[citation needed]
The Staff Minute is initialled J.T.B. and dated 16/2 (1945) and it was approved by a more senior officer as App Excellent on 17/2.
After the action, Commander Taylor went to Holyhead with the damaged HMS Aylmer. HMS Bligh and HMS Tyler were her escorts. On arrival at 11:30 that evening, HMS Tyler was sent back to sea to continue operations and Commander Taylor transferred his flag to HMS Bligh before also going back into the Irish Sea to continue operations with the 5EG. On 27 January 1945, U-1172 was sunk by HMS Keats. In the space of three days, the 5th Escort Group had sunk two U-boats.
Commander Taylor was subsequently Gazetted with the award of the Distinguished Service Cross on 29 May 1945, as was Commander Playne from HMS Calder.
Another theory that has been put forward is that in the noise and confusion of the gun battle the coxswain misheard orders and put the helm over the wrong way. However, published in The Battle of the Irish Sea, Sir David Gibson has included a picture of HMS Aylmer steaming in to ram the U-boat. She still has plenty of sea room and it looks as if the U-boat is underway. The photo was taken by one of Aylmer's officers, Sub Lieutenant G.I. Davis R.N.V.R.
As Holyhead was too small to repair the damage to Aylmer's bows, she made her way to Liverpool where she was repaired. In early April 1945, HMS Aylmer resumed her role as Senior Officer of the 5th Escort Group and on 15 April 1945 the group, by ships, HMS Grindall and HMS Keats sank U-285 125 nautical miles (232 km) south west of Ireland.
On 8 May 1945, VE day, HMS Aylmer was in Belfast, her home port. On 10 May 1945, she was dispatched to Loch Alsh to assist in taking German U-boat crews into captivity. On 5 November 1945, she was returned to the US Navy at New York.