To be "on your last leg" is to be near the end; near collapse. You have scarce resources left to complete something. "Our old family dog is on her last leg (meaning tired, near death). The "leg" here can be interpreted in two ways. First, comparing a leg to the tired or injured legs of a person or an animal after extended effort; there is not much left to stand on. A "leg" is also a counting word for a segment of a long journey. "I would be glad to sell you my car, but I must tell you that it is on its last leg."
on your last legs | on its last legs Informal
Meaning: If you say you're on your last legs, it can mean you're close to exhaustion, or it can mean you're close to death. If a thing is on its last legs, it's close to breaking or wearing out.
For example:
Bobby looks like he's on his last legs. Do you think he can make it to the top of the mountain?
My old printer is on its last legs. It's time I got a new one.
If you are on your last legs, you are in a very weak condition or about
to die.Meaning : If you say you're on your last legs, it can mean you're close to exhaustion, or it can mean you're close to death. If a thing is on its last legs, it's close to breaking or wearing out
المعنى من المصطلح : في مراحلها الآخيرة
Example-:Samir looks like he's on his last legs. Do you think he can make it to the top of the mountain?x