A ramshackle house looks as though burglars have been through it, and that may be exactly where the word comes from. It has nothing to do with rams or shackles.

Merriam-Webster traces ramshackle to an earlier form, ransackled. That was the past participle of ransackle, a now obsolete verb that the dictionary calls a frequentative of ransack. Ransack itself comes from Old Norse rannsaka, from rann, "house," and -saka, related to Old English sēcan, "to seek." To ransack was to search a house.

The step from plundered to rickety is a step of imagery. Merriam-Webster suggests that the picture of a ransacked house, its contents in disorder, inspired the use of ramshackle for anything poorly built or close to collapse. That use took hold in the first half of the 19th century. The dictionary's first known use of the modern adjective is 1830.

The older form had a long run first. Charles Hodgson, writing on OUPblog in 2010, says buildings were first called ramshackle a little less than 200 years earlier. For about a century before that, he says, the usual form was ramshackled.

There was a rival theory. Older etymological dictionaries, Hodgson explains, split the word into a Scottish intensifier ram plus shauchle, a word for shuffling the feet and later for wearing out shoes. Ramshackle would then mean "really worn out."

The problem is timing. The shauchle words turn up in the written record after ramshackled was already in fairly common use. The ransack theory also has the advantage of being about houses rather than shoes, and Hodgson favors it.

The word has spread beyond buildings. Merriam-Webster gives "a ramshackle plot" for a loosely built story and "a ramshackle excuse" for a flimsy one.

One connection is still open. Shack, the American word for a hut, looks like a clipping of ramshackle, and Dictionary.com calls it "probably akin" to it. Merriam-Webster instead derives it, probably, from the dialect word shackly, "rickety," and dates it to 1878.