The meaning of the expression “shake a leg” is to hurry up because you’re late. If someone asks you to shake a leg, they are telling you to make haste with your activity. The saying applies to social and professional situations.
The original meaning of the expression was a term for dancing. While this version is still in use today, it’s more common as a statement to tell someone to hurry up.