During the War of the Spanish Succession, Shovell commanded a squadron which served under Admiral George Rooke at the capture of Gibraltar and the Battle of Málaga. Working in conjunction with a landing force under the Earl of Peterborough, his forces undertook the siege and capture of Barcelona. He was appointed commander-in-chief of the Navy while at Lisbon the following year. He also commanded the naval element of a combined attack on Toulon, base of the main French fleet, in coordination with the Austrian army under Prince Eugene of Savoy in the summer of 1707. Later that year, on the return voyage to England, Shovell and more than 1,400 others perished in a disastrous shipwreck off the Isles of Scilly.