Shallow Brown is a traditional sea shanty, described by sea shanty expert, Stan Hugill, as being used for both pumping water and hauling up the sails. In both cases, rhythmic singing helped the crew all pull at the same time while also helping to pass the time. This is Stan Hugill singing and talking about shanties.
There are several versions of the song; in some the person leaving his lover behind on the quay is described as Shallow, in others (and our version seems more like this) Shallow is a corruption of Challo a Caribbean word for mixed race, which would fit in with the allusions to slavery. It is possible that it started out as a plantation song, sung by slaves and found its way to sea via escaped or freed slaves.
Percy Grainger 'collected' (stole?) the song from John Perring, a Dartmouth singer, in 1908, wiped its face and dressed it in its Sunday best for this version (which adopts the person leaving his lover approach rather than the slavery one).
BMC's version is based on this one by Coope, Boyes & Simpson (which is more slavery-y). Other versions include Richard Hawley and June Tabor. The former singer of The Police has also done a version, but I'm not putting it up. Oh Sting, where is thy death?