One's legs, used as a means of transport.
Shanks' (or shanks's) mare (or nag or pony) derives from the name of the lower part of the leg between the knee and ankle - the shank, nowadays more often known as the shin-bone or tibia. This was alluded to in the early form of this term - shank's nag. This originated in Scotland in the 18th century. There are several early citations in Scottish literature, as here in Robert Fergusson's Poems on Various Subjects, 1774:
"He took shanks-naig, but fient may care."
When it crossed the Atlantic, the expression migrated into 'shank's mare', which remains the common form in the USA. It was first referred to there in the 1860s. This rather unfortunate prediction was made in the Iowa newspaper The Dubuque Daily Herald in May 1869:
"A public exhibition of the velocipede [a predecessor of the bicycle] was given on the streets last evening by Mr. Clark, who managed the vehicle with considerable skill... They are a toy, and will never come into general use in competition with Shank's mare."
In the UK and Australia the term is commonly 'shanks' pony'. It is sometimes capitalized as 'Shank's pony' as some reports claim it to have derived from an individual called Shanks, or from the Shanks & Company Ltd. (formed in 1853 and now absorbed into Armitage Shanks), who previously manufactured lawn-mowing machines. One such horse-drawn mower had no seat and the driver had to walk behind it. Examples of these machines still exist and this would be a plausible theory (albeit one lacking in any real evidence) if it weren't for the clear pre-dating of the Scottish references.
An alternative version of this allusory phrase is "the horse of ten toes".