FYI from a site which has the lyrics of the song
The song, sung by sailors when hauling ropes on their sailing ships, was included by Robert Louis Stevenson in his classic novel "Treasure Island" published in 1883.
Dead Man's Chest is a tiny isle that forms part of the British Virgin Islands in the Caribbean Sea. Local history and folklore claims that pirate Edward Teach, known as Blackbeard, punished a mutinous crew by marooning them on Dead Man's Chest, which has high cliffs and no water and is inhabited by pelicans and snakes. Each sailor was given a cutlass and a bottle of rum.
Teach's hope was that the pirates would kill each other, but when he returned after a month he found 15 men had survived. This would explain the verse: "Fifteen men on the dead man's chest. Yo-ho-ho, and a bottle of rum! Drink and the devil had done for the rest Yo-ho-ho, and a bottle of rum!"