Devil to Pay
The Myth:
It is commonly asserted that this phrase is nautical in origin. According to the myth, the devil in question is not Satan, but rather the seam at the ship's keel, the longest on board. The verb pay means to caulk the seam with tar. So to pay the devil is to caulk the seam along the keel of the ship, a long and arduous task. While that is a great explanation, it unfortunately it is not support by the evidence as being the origin of the phrase. Rather the opposite is true; the phrase probably gave birth to the nautical term devil.
The Facts
As in other cues, we have to go to the lexicographic record. The phrase the devil to pay first appears in Jonathan Swift's 1711 Journal to Stella, a context that has nothing to do with the sea. The phrase has at its origin the metaphor of a Faustian bargain. One pays the devil with one's soul, a very high price.
The devil to pay was indeed used by sailors to mean caulking the keel's seam, but as a humorous application of the Faustian metaphor. Devil is indeed a word used to refer to the seam along the keel of a ship, but the term does not appear until 1744, well after the phrase the devil to pay was in use.
To pay is a nautical verb meaning to smear tar or pitch, dating from 1627.
So it appears as if the sailors used the phrase as a play on their jargon word pay. The nautical use of devil probably comes from the phrase, not vice versa.
This Word Myth is excerpted from page 104 in the excellent humorous book Word Origins by David Wilton.