It's always linked in my mind with Long John Silver from R L Stevenson's "Treasure Island".

Brewer says: An imprecation used by 'stage-sailors' and popular with children's story writers. Presumably of nautical origin, 'shiver' here is used in the sense of 'to shatter' or 'splinter into pieces', the timbers being those of the ship.