Imagine with us for a minute that you are putting together one of those tall, many-tiered, carpeted structures for a cat. You are, however, working with subpar tools and several improvised components. You succeed in getting the thing into something like its intended form only to be suddenly beset with a linguistic conundrum: is the structure jury-rigged or jerry-built or jerry-rigged?
Ah, good question, despite whatever the cat says.
All three terms are established words that are regularly applied to structures reminiscent of the imagined (at least by us) many-tiered carpeted cat structure.
If we were building this structure back in the 18th century, we would have only one of these terms available to us: jury-rig has meant "to erect, construct, or arrange in a makeshift fashion" since the late 18th century, and appears in its participial jury-rigged form from its earliest days. The only caveat here is that our 18th century selves would be using the word completely unconventionally in this context—unless the many-tiered carpeted cat structure were also a boat. That's right: in its early days jury-rigged was a strictly nautical term.
That fact is also our clue that jury-rig has nothing to do with the juries of the courtroom. Jury-rig comes from the adjective jury, meaning "improvised for temporary use especially in an emergency," or "makeshift." It's a 15th century term that comes from the Middle English jory, as known (back then, anyway) in the phrase "jory sail," meaning "improvised sail."
The rig in jury-rigged likewise has nothing to do with the rig that has to do with manipulating or controlling something, like a game or election, to get a desired result. That rig is from a 17th century noun meaning "swindle." The rig in jury-rigged is a 15th century sailing term meaning "to fit out with rigging," with rigging being the lines and chains used in operating a sailing vessel. In the 18th century, if it was jury-rigged it was a boat:
La Couronne … bad bottoms, jury rigged.
— Morning Herald (London), 16 Aug. 1782
Jury-rigged was, of our three words, the only option for describing our questionably constructed many-tiered carpeted cat structure for quite a while. But in the mid-19th century another word came along: jerry-built means "built cheaply and unsubstantially" as well as "carelessly or hastily put together." The origin of this word is unknown, though there is plenty of speculation that it's from some poor slob named Jerry, which is a nickname for Jeremy or Jeremiah. While one named Jerry may reasonably disdain the word, jerry-built is not considered to be a slur. Jerry was used in British English around the time of the First World War as a disparaging word for a German person, but jerry-built predates that use:
The warehouses themselves which have been destroyed were of the class called “Jerry built,” which is equivalent to the term applied in Manchester to the property of building clubs.
— The Guardian (London), 28 Sept. 1842
Before things were jerry-built, it seems that some things were built in the "jerry" style:
Another witness in the same case, Mr. Heighton, a house owner, who was called on the opposite side, was asked what was the meaning of the Jerry style of architecture. “Any thing that is badly built,” was the reply. “Have you any houses in Toxteth-park?” was the next question. “Yes,” said the witness. “Are any of them built in the Jerry style of architecture?” “No.” “What do you call your style?” “A sufficient and substantial style.” “And all your houses are of that order?” “I should say so.” “And what do you call the Jerry style?” “If the work is not well done, and the houses not well finished, we call that the Jerry style.”
— The Liverpool (England) Mercury, 12 Apr. 1839
The definitive proof is absent, but etymologists believe that the similarity between something being jury-rigged and something being jerry-built paved the way for our third word. The jury of jury-rigged isn't transparent to the modern English speaker, but the rigged makes sense: after its "to fit out with rigging" meaning, rig developed other senses, including "to equip," "to construct," and "to put in condition or position for use." And so it was that in the late 19th century, the word jerry-rigged sidled up to the language and asked to come inside, offering a meaning of "organized or constructed in a crude or improvised manner":
Naturally the naval and military establishments have been potent factors in the improvement and development of so convenient a neighborhood, while the efforts of the corporation, in laying out the ground, have received great support from the Government, which, as principal landlord, has taken care that its tenants should carry out building operations in a fashion unconnected with the speculative builder and the “jerry-rigged” villa.
— The Daily Telegraph (London), 17 Sept. 1890I learned this one afternoon when something went wrong with the jerry rigged derrick we were using.
— The New England Farmer (Boston, MA), 15 Mar. 1902
While some will assert that jerry-rigged is an inferior sort of word to be avoided, it is in fact fully established and has been busy in the language for more than a century, describing any number of things organized or constructed in a crude or improvised way. Jury-rigged and jerry-built are somewhat older and not generally criticized, and have the added benefit of having corresponding verb forms. Jury-rigged is the best choice when the makeshift nature of the effort is to be emphasized rather than a shoddiness that results; the one who jury-rigs is merely doing what they can with the materials available. Jerry-built is most often applied when something has been made quickly and cheaply; the one who jerry-builds something builds it badly.
Whatever your imagined many-tiered carpeted cat structure looks like, of course, the important thing is not which word you choose to describe it but how happy the box it came in is making your cat.