It is not at all likely that any self-respecting sailor would have ever thought of using or even dared to use such an exclamation or oath as this, but, in 1834, the sailor and novelist, Frederick Marryat, finding the necessity for an oath, in Jacob Faithful, chapter XI, that would not offend the ears of the most puritanical reader invented this most innocuous expression: “I won’t thrash you, Tom. Shiver my timbers if I do.”
John B. Opdyke, in Mark My Words (1949), page 584, says “the expression ‘shiver my timbers’ belongs to cricket, referring to scattering or strewing wickets for which timbers is a slang substitute.”
The statement is partly true, and would have been entirely true if he had said “was adopted by cricket,” in which game it is now used.