Where does "on one's last legs" come from?

To be on one's last legs means to be worn out, tired, run down, and ready to die or otherwise cease working. Some examples I've found are

Grandfather is on his last legs. He'll be on his way to Heaven soon.

I just ran a mile to tell you this; I can't walk up the steps. I'm on my last legs.

My car is on its last legs. I doubt it will get me down the street to the used car dealer.

I've searched a bit on the interwebs, and while definitions abound, I can find no reference to the origin of the phrase. Why "last legs"? What happened to the first ones? What has interchangeable legs anyhow?


Solution 1:

To add to @Robusto's answer - regarding the origin - the following seems more definitive and is taken from "The Facts on File dictionary of clichés"

To be extremely tired or about to collapse; near the end. Despite the implication, this term never meant that legs were in any way serial—that is, beginning with the first and ending with the last. Rather, it uses last meaning “near the end” (of one’s energy or life). The expression was already used in the sixteenth century; it appears in the play The Old Law (1599) by Thomas Middleton and Philip Massinger: “My husband goes upon his last hour now—on his last legs, I am sure.” In John Ray’s Proverbs (1678) the term is defined as meaning “bankrupt,” and since then it has been transferred to anything nearing its end or about to fail, as in, “This cliché may be on its last legs.”

However this link dates "The Old Law" as

On his last legs. The Old Law (1618-19), Act v. Sc. 1.

The exact text as it appears online

EUGENIA My husband goes upon his last hour now.

FIRST COURTIER On his last legs, I'm sure.

EUGENIA September the seventeenth, I will not bate an hour on it; and tomorrow His latest hour's expired.

Solution 2:

Various sources lists its first usage from the 1590s, and the Google Books result in an etymological dictionary of the Scottish language gives this explanation of the source of the term (screen snap because no C&P available in GB):

enter image description here

Edited to add link to the material, which I forgot earlier.

Also, because of some dialogue in the comments. let me add that last legs does not mean the last of a series of legs, but the last stages of leg strength. It's a metaphorical usage; in fact, legs is used her as a metonym standing in for strength, vitality, or life itself.