late 13c., from a Scandinavian source, probably Old Norse leggr "a leg, bone of the arm or leg," from Proto-Germanic *lagjaz (cognates Danish læg, Swedish läg "the calf of the leg"), a word with no certain ulterior connections. Perhaps from a PIE root meaning "to bend" [Buck]. For Old Norse senses, compare Bein, the German word for "leg," in Old High German "bone, leg" (see bone (n.)). Replaced Old English shank (n.), itself also perhaps from a root meaning "crooked."
Distinguished from an arm, leg, or fin in being used for support. Of triangle sides from 1650s (translating Greek skelos, literally "leg"). Extended to furniture supports from 1670s. Meaning "part of pants which cover the leg" is from 1570s. By 1870s as an adjective it had a salacious suggestion of artistic displays focused on the female form, such as leg-piece in theater jargon, leg-business as slang for "ballet."
The meaning "a part or stage of a journey or race" (1920) is from earlier sailing sense of "a run made by a ship on a single tack when beating to windward" (1867), which was usually qualified as long leg, short leg, etc. Slang phrase shake a leg is attested from 1869 as "dance," 1880 as "hurry up." To be on (one's) last legs "at the end of one's life" is from 1590s, the notion is of something that serves one for support and keeps one moving. To take leg bail was old slang for "run away" (1774). Legs "ability to be an enduring success, staying power" is from 1970s show business slang.
"to use the legs; walk or run," c. 1500 (from the beginning usually with it); from leg (n.).