On his legs. Mr. So-and-So is on his legs, has risen to make a speech.
On its last legs.
Moribund; obsolete; ready to fall out of cognisance. To set on his legs. So to provide for one that he is able to earn his living without further help. To stand on one's own legs. To be independent: to be earning one's own living. Of course, the allusion is to being nursed, and standing “alone.” (See Bottom.)
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894