Green’s Dictionary of Slang

show a leg v.

also show leg
[show a leg, to make an appearance, is SE]

1. to run off, to escape; to move at speed.

[UK]‘An Amateur’ Real Life in London I 137: [He] grabb’d his pocket-handkerchief, and was after shewing a leg,† when a little boy that kept his oglers upon ’em, let me into the secret, and let the cat out of the bag by bawling—Stop thief! [†Shewing a leg—or, as it is sometimes called, giving leg bail—making the best use of legs to escape detection].
[US]R.M. Bird Nick of the Woods I 177: I’ll fight for you, or run for you, take scalp or cut stick, shake fist or show leg.
[US]T. Haliburton Clockmaker III 60: So we showed a leg right off, trotted down-stairs, and into the coach in no time.
[Ind]H. Hartigan Stray Leaves (1st ser.) 270: The fellow whom I had disarmed thinking discretion the better part of valour was showing a leg to escape.
[UK]H. Caine Deemster I 221: He’d better show a leg if he don’t want the rat’s tail.

2. to dance.

[UK]Navy at Home II 168: Some, even from among the blue coats; who had shewed a leg at the upper rooms at Bath, or at fashionable parties.