I've been trying to search for the origin and meaning of the phrase "Shiver my timbers", but can't seem to find anything.
Shiver my timbers!
Shiver means to break into splinters or small pieces (unrelated to cold shivers). Timbers refers to the wooden parts of a ship's hull. So "Shiver my timbers!" is similar to exclaiming "Well, strike me down!"
The OED has shiver my timbers from 1834, but the oldest reference I can find is from The Tomahawk! or, Censor General of Friday November 6, 1795:
The earliest the OED has for any nautical slang with my timbers is 1790 by Charles Dibdin in A Collection of Songs, Selected from the Works of Mr. Dibdin:
This can also be found in 1789, but I found many earlier exclamations:
Split my timbers!
Plays Written For a Private Theatre (1786) by William Davies:
Start my timbers!
The Adventures of Sir Launcelot Greaves (Third Edition, 1775) by Tobias George Smollett:
The verb start has many meanings in the OED, and this was current at the time:
The story was first published in the British Magazine in 1760 and as a book in 1762.
Smite my timbers!
Again, in the same book (The Adventures of Sir Launcelot Greaves, Third Edition, 1775 by Tobias George Smollett):
There's a few variations of "smite my ..." in the book.
Odds my timbers!
Yet again by Tobias George Smollett, this time in The Adventures of Peregrine Pickle (1751):
Odds was a minced oath for God's, presumably in this context urging God to do something unspecified to my timbers.
The Anatomy of Swearing (2001) by Ashley Montagu catalogues Smollett's swears:
A shiver, or in carpentry more commonly a “shake”, is a defect in timber, a split along the grain. Roofing shingles are also known as “shakes”, as they are split from the parent timber.
Hundreds of years ago when ships were mainly made of wood, a cannon attack would shiver the timbers, as here from the early 1800's.
A pirate captain would obviously refer to this on his ship as shiver my timbers (although as @Kitḫ points out below, he'd probably say me rather than my).
I'll expand my answer then:
Shiver in this context means to splinter or to break in or into pieces rather than to shudder, the more familiar definition of shiver. Timber was nautical slang for the wood comprising the hull of the ship, so shiver my timbers literally meant blow my ship to little bits.
The way pirates talked and the phrases they used (or didn't) aside, we gather this from Wikipedia:
In case you care not to read the above, in summary, it states that it can be attributed to Frederick Marryat, in the publication named Jacob Faithful, published in 1895.
However, Wikipedia does provide further information to help explain the formation and meaning:
Online Etymology Online reports that the origin of shiver me timbers is 1835, as a mock oath attributed in comic fiction to sailors.