She was laid down at the Yarrow & Company yard in Scotstoun, Glasgow, and was launched on 12 December 1911.
Attack and Archer used steam at higher pressures than the other Acheron-class destroyers and consequently were faster than the standard Admiralty-designed members of their class. Achieving 31 knots (57 km/h; 36 mph) on trials, she carried two 4 in (100 mm) guns, other smaller guns and 21 in (530 mm) torpedo tubes and had a complement of 70 men.
As part of the First Destroyer Flotilla, she was attached to the Grand Fleet in August 1914, and then to the Third Battle Squadron from the spring of 1916.
As part of the Harwich Force, the First Destroyer Flotilla took part in the Battle of Heligoland Bight on 28 August 1914.
On 24 January 1915, Attack, commanded by Lieutenant Commander Cyril Callaghan, took part in the Battle of Dogger Bank as part of the First Destroyer Flotilla. In the final stages of the battle, at 11:20, with his flagship — the battlecruiser Lion — seriously damaged, Vice Admiral Beatty called Attack to come alongside. He shifted his flag into her at 11:34, and used her to rejoin the rest of the battlecruisers, shifting again into Princess Royal at 12:20.
On 10 March 1915, in company with her sisters Ariel and Acheron, Attack was searching for a German submarine reported by the trawler Man Island near Aberdeen. At 10:10, Attack sighted U-12 and opened fire. Ariel sighted the submarine at 10:12 at about 2 nmi (2.3 mi; 3.7 km) and all three destroyers turned towards it. U-12 dived and raised her periscope, which Ariel sighted at a distance of 200 yd (180 m). She turned to ram, sighting the conning tower under the water in the final moments before she struck the submarine at a fine angle. Within two minutes, the submarine had returned to the surface so that the crew could escape, but they found the conning tower hatch jammed, and most of the survivors managed their escape via the other hatches. The destroyers opened fire as the submarine lay on the surface, killing and injuring some of the escaping sailors. At 10:30, U-12 sank at about 56°15′N 1°56′W. 19 men were killed; the destroyers rescued 10 survivors. The damage to Ariel's bows was so serious that she had to be towed into port.
Attack took part in the Battle of Jutland on 31 May 1916. Commanded by Lt Cdr C H N James, she formed part of the First Destroyer Flotilla, led by Fearless.
On 8 August 1917, Attack went to the aid of Dunraven, a Royal Navy Q-ship which had been seriously damaged in a battle with UC-71. Despite the aid of several Royal Navy and US Navy ships, Dunraven sank at 01:30 early on 10 August 1917.
In 1917, the Third Battle Squadron was sent to the Mediterranean.
On 27 December 1917, Attack and two Imperial Japanese Navy destroyers escorted two transport ships, HMT Aragon and SS Nile, from Malta to Egypt. The convoy weathered a gale, and off the Egyptian coast at daybreak on Sunday 30 December it divided. Nile and the two Japanese destroyers proceeded to Port Said, while Aragon and Attack made for Alexandria. Aragon and Attack were in Alexandria Roads about 8 miles (13 km) or 10 miles (16 km) outside the port, awaiting permission to enter, when at about 1100 hrs the German Type UC II submarine SM UC-34 torpedoed Aragon, which rapidly began to sink.
Attack and the armed trawler HMT Points Castle came to the rescue. Attack drew right alongside Aragon to take survivors aboard as quickly as possible, helped by lines cast between the two ships. About 17 to 20 minutes after being hit Aragon went down, and she suffered a second explosion as the cold seawater reached her hot boilers. Some of her boats were left upturned in the water.
Attack was now crowded with 300 to 400 survivors: some naked, some wounded, many unconscious and dying. One soldier, Sergeant Harold Riddlesworth of the Cheshire Regiment, repeatedly dived from the destroyer into the sea to rescue more survivors. He survived and was decorated with the Meritorious Service Medal.
Then a torpedo struck Attack amidships and blew her into two pieces, both of which sank with five to seven minutes. The explosion ruptured Attack's bunkers, spilling tons of thick, black bunker fuel oil into the sea as she sank. Hundreds of men were in the water, and many of them became covered in oil or overcome by its fumes. Aragon's surviving lifeboats now ferried hundreds of survivors to the two trawlers and other trawlers came out to assist.
Ten seamen from Attack and 600 men from Aragon were killed. The wrecks of both ships now lie in an approximate position of 31°18′N 29°49′E.