After the plundering of eleven slave ships anchored in Ouidah, Roberts saw what he believed to be a great merchant ship on February 5, 1722, and gave the Great Ranger one of three ships in his fleet under Captain James Skyrme the order to pursue. The supposed prey however was the HMS Swallow under Captain Chaloner Ogle, a warship with 60 cannons on board. After a mock retreat, the purpose of which was to get the two ships out of sight of the rest of the pirate fleet, the Swallow suddenly turned back, fired a broadside at the Great Ranger and boarded her.
On February 10, 1722, the warship met the Royal Fortune, which was anchored, and Ogle gave the order to attack. After being informed that the warship was on an attack course, Roberts is said to have finished breakfast, put on his best clothes and armed himself before facing the battle. In the ensuing naval battle, at about eleven o'clock in the morning, standing on a gun carriage, he had his throat slit by a Swallow's cartridge, after which the rest of the crew fought on for about three hours before finally surrendering. Bartholomew Roberts' body was thrown overboard, as he had requested several times during his lifetime, so that he would not be caught. Similar to Blackbeard's last battle, one of Roberts' men tried to blow up the powder magazine and the ship. However, after the pirates surrendered, he was overpowered. 95 crew members were subsequently sentenced at Cape Coast Castle in Ghana, 52 of them to death by hanging.