She was ordered on 1 November 1932 as part of the 1931 Naval Programme; launched on 15 February 1934 at the Hawthorn Leslie Shipyard at Hebburn, Tyneside. The costs to build the ship have been given as approximately £300,000 (Janes), £247,000,[4] or £253,350 (excluding the items supplied by the Admiralty such as guns and communications equipment).[5]

Upon commissioning in 1934, she was attached to the 5th Destroyer Flotilla, Home Fleet, along with the rest of her sister ships. In September 1935, the 5th Flotilla was transferred to the Mediterranean Fleet for the duration of the Abyssinian crisis before returning to the Home Fleet the following March. In 1936, Electra was assigned to Non-Intervention Patrols in Spanish waters during the Spanish Civil War. In 1938, she underwent a refit at Sheerness, and then was placed 'in reserve'. On 2 August 1939, she was 'Brought forward' (taken out of reserve) with Reservist ship's company, and on 26 August 1939, she attended a review by King George VI.

At the beginning of World War II, Electra was attached to the 12th Destroyer Flotilla. On 3 September 1939, Electra took part in the rescue of survivors of the liner Athenia, which was torpedoed by the German submarine U-30. The captain of Electra, Lieutenant-Commander Stuart Austen "Sammy" Buss, was the Senior Officer present at the scene so he took charge. He sent the destroyer Fame on an anti-submarine sweep of the area, while Electra, her sister shipEscort, the Swedish yachtSouthern Cross, the Norwegian cargo ship Knut Nelson, and the American tankerCity of Flint rescued the survivors. Part of the rescue effort included sending a whaler to rescue a woman still in a bunk in the sick bay of Athenia. Between the ships, about 980 passengers and crew were rescued; only 112 people were lost, and Athenia sank the next morning.

Her next assignment was to escort a convoy out of Pentland Firth, along with HMS Exmouth and Inglefield. During a violent storm which lasted over two days, an ammunition locker on the forecastle broke loose, and was sliding around the deck. The locker was full of shells, and needed to be secured. After a short time, several volunteers managed to corral the loose object. After a boiler cleaning at Rosyth in December 1939, Electra continued escorting convoys and hunting U-boats in the Western Approaches area until April, 1940. Some of the convoys she is known to have escorted include ON 14, HN 14, ON 16, HN 16, ON 18, HN 18, ON 20, and HN 20.

In early April, 1940, Electra escorted two convoys to Norway and back. The first trip, which also included HMS Escapade and the cruiser HMS Southampton, was uneventful. On the second trip, the convoy was attacked by German bombers. An ex-Polish liner serving as a transport was sunk, but the rest of the convoy arrived safely. After the convoy was delivered, Electra was tasked to drop off two Army officers at a desolate location. During this time, Electra shot down a German bomber with her 4.7-inch (120 mm) guns.

On 13 June 1940, she escorted the aircraft carrierHMS Ark Royal when she launched an air attack on Trondheim, Norway. In heavy fog, the admiral ordered the formation to turn into the wind so Ark Royal could launch aircraft. The destroyer screen was in arrowhead formation ahead of the capital ships; Electra in the port wing, HMS Antelope in the starboard wing. The message "Blue nine repeat Blue nine – Executive signal." to turn was given on a low-power short range radio. Apparently, the telegraphist of Antelope missed the signal; as a result, Antelope continued on course while Electra executed the turn. Suddenly, Antelope appeared, cutting across the bows of Electra. With no time to stop, Electra hit Antelope aft, in the wardroom pantry, just aft of the engine room. One man from Antelope climbed up Electra's anchor chain to get away from the damaged area. Her bow was severely damaged, and it took Electra and Antelope four days to get back to Scotland at slow speed. She was repaired and refitted at the Ailsa Shipbuilding Company yard at Troon, South Ayrshire, Scotland through the end of August. Ailsa was noted primarily for the yachts it has built, and Electra was the largest repair job it had handled to date. Here she had her bow repaired, as well as having her after bank of torpedo tubes replaced by a 3-inch anti-aircraft (AA) gun, and one 20 mm Oerlikon fitted centrally on the light AA platform. Also, during the refit and repair time, the wardroom was painted in the team colours of the Glasgow Rangers football (soccer) team, which was the favourite team of the yard manager heading up the repair work. After conducting post-refit trials on 31 August, she joined the 3rd Destroyer Flotilla, Home Fleet, based at Scapa Flow.

Her first assignment after her repair work was completed was to escort the ships of the 1st Minelaying Squadron, along with the destroyers HMS Jackal, Versatile, and Vimy, during the laying of a deep minefield in NW approaches to Irish Sea (Operation SN41). After this, she was part of the escort of the battlecruiserRepulse in a hunt for a German surface raider that had attacked Convoy HX 84 sinking the armed merchant cruiserJervis Bay and five ships from the convoy. Electra later joined the search for survivors from the convoy.

In December, she was again on patrol seeking a German surface raider that had been reported as breaking out into the North Atlantic. The force consisted of the battlecruiser Hood, the light cruiserEdinburgh, and the destroyers Electra, Escapade, Echo, and Cossack. After spending a week at sea, including Christmas Day, after the report turned out to be false, she returned to port on New Year's Eve. It was here that they got word that the ship's current Captain, Lieutenant-Commander Buss, was promoted to Commander and would transfer to the destroyer Punjabi, and the ship received a new Captain, Lieutenant-Commander Cecil Wakeford May, who would be her captain until she was sunk. (Commander Buss was later killed in action on HMS Dulverton on 13 November 1943.) A few days after this, Electra was sent into the Arctic for a mission to find surface raiders, returning through the Denmark Strait and refuelling from a cruiser in heavy seas on the way.

The first four months of 1941 saw Electra performing mostly convoy work around the British Isles and Bristol Channel, mostly in cold weather and heavy seas. in January, she escorted the battlecruiser Hood during Operations SN6 and SN65, providing cover for minelaying in the Northern Barrage by ships of 1st Minelaying Squadron. Starting on 23 January, Electra participated in Operation Rubble, the escape of several Norwegian merchant ships from Gothenburg, Sweden. In February, she escorted Convoy WS6A during passage from the Clyde for two days; then in late February, she escorted the battleship Prince of Wales during contractor's trials. One of the trips was as escort to convoy HX 122, which left Halifax on 20 April and arrived in Liverpool on 8 May. On one of the trips, she rescued the crew of a Coastal CommandAvro Anson patrol aircraft that had crashed into the ocean. In March, Electra and Inglefield escorted the battleship HMS Queen Elizabeth in a search for the German battlecruisers Scharnhorst and Gneisenau. In mid-May, Electra took part in Operation SN9B, escorting ships of 1st Minelaying Squadron during the laying of mines in the Northern Barrage.

In early May, the British Admiralty was on the alert that Bismarck might attempt to break out into the North Atlantic. As a consequence, Electra was ordered to Scapa Flow for possible deployment against the Germans. Just after midnight of 21/22 May 1941, Electra sailed along with the destroyers Achates, Antelope, Anthony, Echo, and Icarus, escorting Hood and Prince of Wales to cover the northern approaches. The intention was that the force would refuel in Hvalfjord, Iceland, and then sail again to watch the Denmark Strait. On the evening of 23 May, weather deteriorated. At 2055 hrs., Admiral Lancelot Holland aboard Hood signalled the destroyers "If you are unable to maintain this speed I will have to go on without you. You should follow at your best speed." At 0215 on the morning of 24 May, the destroyers were ordered to spread out at 15-nautical-mile (28 km) intervals to search to the north.

At about 0535, the German forces were sighted by Hood and, shortly after, the Germans sighted the British ships. Firing commenced at 0552. At 0601, Hood took a 38 cm (15-inch) shell from Bismarck in the after magazine, which caused a massive explosion, sinking the ship within two minutes. Electra and other destroyers were about 60 nautical miles (111 km) away at the time. Upon hearing that Hood had sunk, Electra raced to the area, arriving about two hours after Hood went down. They were expecting to find many survivors, prepared hot coffee and rum, set up the medical facilities for the casualties, rigged scrambling nets and heaving lines, and placed life belts on the deck where they could be quickly thrown in. From the 94 officers and 1,321 enlisted men who were aboard Hood, only 3 survivors were found. Electra rescued these three and continued searching. Shortly thereafter, Icarus and Anthony joined in the search and the three ships searched the area for more survivors. No more survivors were found, only driftwood, debris, clothing, personal effects, broken rafts and a desk drawer filled with documents. After several hours searching, they left the area. With the sea as cold as it was, survival in the water was measured in minutes. There was little probability that anyone was left alive in the water. (See Battle of the Denmark Strait).

After dropping off the survivors in Iceland, she refuelled and then sailed immediately to escort the damaged Prince of Wales to Rosyth. After arriving, the men went on a quick shore leave, their first in many months. Then in a period of two weeks, she went to Scapa Flow, then made a run down the West Coast of England, then to Ireland, then refuelled at Derry and then escorted a troop convoy into the Atlantic.

After this, she went into refit at Green & Silley Weir in the Royal Docks at London for six weeks, escorting a convoy to Sheerness on the way. When she came out of the yard, she sported a new disruptive camouflage paint scheme of blues, greens, and greys. Just two days out of the yard, she was on convoy duty again, escorting a convoy through what was called "Bomb Alley". The convoy came under heavy attack by German aircraft, but suffered no losses. She then went on to Scapa Flow for assignment.

Shortly after arriving at Scapa Flow, she was detailed to serve as Senior Escort for the first of Arctic convoys to the Soviet Union, called Operation Dervish, which consisted of six merchantmen, escorted by destroyers Electra, Active and Impulsive, three Algerine-classminesweepers, and three trawlers. The convoy kept well to the west of Norway, and made a wide sweep to avoid the German bases in northern Norway, before turning south to Archangelsk. There were no losses on the trip to Russia, or on the return trip (Russian Convoy QP1) with the destroyer Active, cruisers HMS London and HMS Shropshire, and 11 merchantmen starting on 26 September, and arriving in England on 10 October. (See Dervish Convoy).

On Monday, 20 October 1941, the crew of Electra got word that they, together with Express, would be escorting HMS Prince of Wales to the Far East under the command of Vice-Admiral Sir Tom Phillips, where the ships would form the nucleus of a new Eastern Fleet intended to deter Japanese aggression. Over the next three days, they loaded with supplies and ammunition, and returned the parkas they had obtained for their Russian trip. On 23 October, they sailed out of Scapa Flow for Greenock, and on 25 October, they sailed for the Far East. This force would be known as Force G until they reached the Far East; then they would be re-designated Force Z. They were accompanied by HMS Hesperus, loaned by Western Approaches Command, for the first part of the trip. The destroyers refuelled from Prince of Wales south of Ireland. Two days later, another destroyer, HMS Legion, was detached from a Gibraltar convoy to cover Prince of Wales while Electra and Express refuelled again from a tanker in Ponta del Garda in the Azores. After Electra and Express returned the following day, Hesperus and Legion departed for Gibraltar.

On 2 November, the three ships put into Freetown. They had shore leave and left the next day. They refuelled on the way and arrived at Cape Town on 16 November, with the destroyers putting into Simonstown Naval Base. The crew had shore leave again, but several events, including press interviews, were cancelled. They left Cape Town on 18 November and arrived at Colombo, Ceylon, on 28 November, stopping at Mauritius and Addu Atoll to refuel on the way. While at Addu Atoll, the crew of Prince of Wales cooked the Addu detachment of Royal Marines a Christmas dinner and sent ashore fresh fruit, meat, vegetables, beer and Navy rum.

On 29 November, the destroyers Encounter and Jupiter, detached from the Mediterranean Fleet, joined at Colombo and the five ships sailed later that day. The ships were joined at sea by the battlecruiser Repulse which had sailed from Trincomalee. The force then set course for Singapore, where they arrived on 2 December. They spent a few days there with shore leave and refit, while awaiting orders. On 1 December, it was announced that Sir Tom Philips had been promoted to full Admiral and appointed Commander-in-Chief of the Eastern Fleet. A few days later, Repulse started on a trip to Australia with HMAS Vampire and HMS Tenedos, but the force was recalled.

Early in the morning of 8 December, Singapore came under attack by Japanese aircraft. Prince of Wales and Repulse shot back with anti-aircraft fire. No planes were shot down and the ships sustained no damage. After receiving reports of the attack on Pearl Harbor and the invasion of Siam by the Japanese, Force Z put to sea at 1730 hrs. on 8 December. Force Z at this time consisted of Prince of Wales and Repulse, escorted by the destroyers Electra, Express, Vampire, and Tenedos. At about 1830 on 9 December, Tenedos was detached to return to Singapore, because of her limited fuel capacity. That night Electra sighted and reported a flare to the north. This caused the British force to turn away to the southeast. The flare was dropped by a Japanese aircraft over its own ships by mistake, and caused the Japanese force to turn away to the northeast. At this point, the two forces were only about five miles (8 km) apart.

At 2055, Admiral Philips cancelled the operation and ordered the force to return to Singapore. On the way back, they were spotted and reported by the Japanese submarine I-58. The next morning, 10 December, they received a report of Japanese landings at Kuantan and Express was sent to investigate the area, finding nothing. That afternoon, Prince of Wales and Repulse were sunk off Kuantan by 85 Japanese aircraft from the 22nd Air Flotilla based at Saigon. (See Sinking of Prince of Wales and Repulse). Repulse was sunk by five torpedoes in 20 minutes, and Electra and Vampire moved in to rescue survivors of Repulse, while Express rescued survivors of Prince of Wales, which sank slowly following the attacks.

Electra sent out radio messages that Repulse and Prince of Wales had sunk and that Admiral Tom Phillips had gone down with them. Even after they were rescued, some survivors of Repulse manned Action Stations on Electra, to free Electra sailors to rescue more survivors. In particular, Repulse gunners manned the 'X' and 'Y' 4.7-inch mounts and the ship's dentist of Repulse assisted Electra's medical teams with the wounded. In total, nearly 1,000 survivors of Repulse were rescued, of which Electra saved 571, some of whom would later be captured at Malaya and the Dutch East Indies when both were surrendered by the British three months later, and some were lost aboard British ships sunk by the Japanese in the Indian Ocean and at the Battle of the Java Sea. Electra and the other destroyers returned to Singapore to drop off the survivors, refuel and replenish their ammunition.

The next three weeks or so saw Electra escorting convoys, and resting in Singapore in between. She had 'crossed the line' (equator) so many times that the crew stopped keeping count. One of her frequent consorts in these escort operations was the light cruiser HMAS Hobart. In the last week of January, Electra was part of the escort for a troop convoy, BM-11, consisting of the American transports USS West Point and USS Wakefield and the British ships Duchess Of Bedford, Empress of Japan, and Empire Star, which was carrying troops from Bombay, India, to Singapore. This convoy was brought into Singapore on 29 January via Berhala Strait, Durian Strait, and Philips Channel, and then proceeded to Keppel Harbor. Here, at about 1100 on 31 January, Electra came alongside West Point and transferred 20 naval dockyard personnel, 8 women, one Free French officer, and a Royal Air Force officer to West Point for passage to Ceylon. (One of these women gave birth to a baby on board West Point on 4 February).

Some of the convoys that Electra was known to have escorted included:

BM-9B, which left Bombay on 22 December 1941, carrying the vehicles and stores for the 45th Indian Infantry Brigade; Electra escorted this convoy from 3 January 1942 until its arrival at Singapore on 6 January.

BM-10, which left Bombay on 8 January 1942, with the 44th Indian Infantry Brigade Group (6000 men), and vehicles and stores for the 18th Division; Electra was part of the escort between 20 January and 22 January.

BM-11, (mentioned above) which left Bombay on 19 January 1942, carrying 5 light anti-aircraft batteries, 1 light tank squadron, and the 18th Division (except the 53rd Brigade Group), a total of 17.000 troops; Electra was part of the escort from 24 January until its arrival at Singapore on 29 January.

BM-12 Return trip to Bombay; Electra was part of the escort from 7 February to 9 February while the convoy went through the Sunda Strait.

Starting on 3 February, they also had the task of towing the destroyer HMS Isis which had been undergoing refit from Singapore to Java. They were attacked by a Japanese high-level bomber on the way, but sustained no damage. (T. J. Cain in his book HMS Electra states that it was an I-class destroyer, and that Electra was the tow ship; Steve Gartland in an article in "The Sun" states that the destroyer being towed was HMAS Vendetta, that the tow ship was a tug named Ping Wo, and that Electra was an escort out of Tanjong Priok starting on 17 February.) Just before Singapore fell, Electra and other destroyers escorted the remaining merchant ships to Tanjong Priok, Java.

On 26 February 1942, Electra arrived at Surabaya from Tanjong Priok, along with HMS Exeter, HMAS Perth, the Dutch light cruiser Java, and the destroyers Jupiter and Encounter. HMS Dauntless, HMS Danae, and HMAS Hobart remained at Tanjong Priok. On 27 February, the striking force left Surabaya, the three British destroyers in the lead, with Electra in the center, Jupiter to port, and Encounter to starboard; followed by the Dutch cruiser De Ruyter, HMS Exeter, USS Houston, HMAS Perth, and HNLMS Java; followed by two Dutch and four American destroyers. (See Battle of the Java Sea.)

That afternoon, they made contact with the enemy. Electra managed to evade the shells and torpedoes in the first round. At 1715, Exeter received a hit which destroyed a 4-inch (102 mm) gun mount and then exploded in a boiler room, causing her to lose speed. At 1725, seeing that Exeter was in trouble, Electra headed toward the enemy ships, followed by the other two British destroyers, to cover Exeter's escape. After several near misses from gunfire from the Japanese light cruiserJintsū, Electra fired back, scoring several hits on Jintsū and the destroyer Asagumo. During this slugging match, Electra sustained several hits, which knocked out A and X gun mounts, wrecked the electrical system forward, cut off all communications, destroyed a searchlight platform, damaged the after boiler room, and ruptured the main steam line. Electra came to a stop, fired off her torpedoes, and started to list to port. After a fire started under 'B' gun mount and 'Y' mount ran out of ammunition, abandon ship was ordered. One surviving whaleboat got away after being loaded with wounded, but it was destroyed by a shell shortly after. She sank shortly afterwards on the afternoon of 27 February 1942, bow first, with the White Ensign still flying.

That night, about 0235hrs. in the morning of 28 February, 54 survivors of the 173 men on board were picked up by the United StatessubmarineS-38, and were taken to Surabaya. When the submarine surfaced in the middle of the survivors, they were not sure if it was friendly or enemy. One of the survivors recognised the submarine as being friendly, because it had an 'Admiralty' type anchor; and at that time, only United States submarines still had this type of anchor. One of the survivors died on the submarine on the way. After treatment in a Dutch hospital, 42 survivors were taken to Australia by the inter-island steamer Verspeck, where they arrived on 10 March. One more survivor died at the hospital, and 10 others in critical condition were left at the hospital.

After spending some time there recovering, many of the survivors were put on the liner Nankin, bound for Ceylon, and ultimately, home to Britain. On the way, Nankin was attacked and sunk by the German raider Thor. The survivors, after spending seven weeks on the raider's supply ship Regensburg, were handed over to the Japanese, where they spent the rest of the war in a Japanese prison camp.

On 19 August 2003, the wreck of Electra was found. It is lying on its port side in approximately 160 feet (49 m) of water, almost completely covered with fishing nets. Her wreck had been badly damaged by illegal salvagers when an expedition surveyed the site in 2016.[6][7][8]