The term, of course, is for someone to “do well” or “have a great show” and is typically used before a stage performance or an audition. But I’m sure you’re here for the origin of “break a leg”.
Like most theatre sayings and terms, the origin of “break a leg” is nebulous and disputed. In any event, the term does not appear until the 1920's, in the United States. There are really three theories regarding the origin of this phrase. Let's look at them and let you pick your favorite.
First (and most popular) theory:
Superstition. According to this theory, wishing someone “good luck” would be provoking ghosts or the “evil eye” actually causing bad luck for the actor. By this logic, you would be a wishing good luck for the performer. The first documented instance of someone using the term to wish luck is October 1st, 1921 edition of the New Statesman. Robert Wilson Lynd is talking about it being unlucky in horse racing, of all things, to wish someone luck so “you should say something insulting like, ‘May you break your leg!” He goes on to mention that theater people are the second most superstitious group next to those involved in horse racing. Another of the early documented references of “break a leg”, this time directly referring to theater, was in the 1939 A Peculiar Treasure by Edna Ferber, where she implies a different (and totally mean girl style) motive, “…and all the understudies sitting in the back row politely wishing the various principals would break a leg”. This theory, they say it hoping the principal actors will be injured so the understudies can possibly take the lead. A third possible construction is the German phrase “Hals und beinbruch”. The sentiment is “Happy landings” in English. Pilots use the term, but the literal translation is “breaking all one’s bones”. It is highly possible actors adopted this phrase, just like whistling, as it was just after WWI that the sentiment seems to have gained widespread popularity.
This version may be my favorite. Traced all the way to Elizabethan language, to “break a leg”, in Shakespearean time, meant literally "to bow"- by bending at the knee. A successful actor would have to bow so many times after a well executed performance that they would “break a leg” onstage from receiving so much applause. Others may trace “break a leg” to the tradition of how audiences would show applause in Ancient Greece. Instead of applauding actors by clapping their hands together, audiences would stomp their feet. Stomping to the point of actually breaking a leg is unlikely- but still, the phrase is meant to be figurative and not literal.
Landing a role in show is called “getting a break” and being newly successful is called “breaking into the business”. These also may be where the “break a leg” term evolves from.
Evidently, in the days of early vaudeville, the producers would book more performers than could possibly perform in the given time of the show – since “bad” acts could be pulled before their completion. So, in order to insure that the show didn’t start paying people who don’t actually perform, there was a general policy that a performer did NOT get paid unless they actually performed on-stage. The long curtains that are on the side of the stage hiding the performers are called "legs". So the phrase “break a leg” referred to breaking the visual plane of the legs that lined the side of the stage.
i.e. “Hope you break a leg and get on-stage so that you get paid.
The exact origin of “break a leg” for wishing someone luck is a haphazard guess at best. Whatever spawned the exact term, it seems plausible that it either gained popularity from the idea of wishing bad luck on someone is good luck, or in sarcastically wishing them ill will so that an understudy could perhaps get their shot to take over the role, there is no denying that it is one of the most well known theatre phrases, even with its murky origins.
Dancers have their own version of “break a leg” which connects to the superstitious concept of not wishing other dancers “good luck”. They will say “Merde!” This translates in English to a well-known four-letter word that describes human waste. This term seems more expressive of not evoking ill or bad luck, but as well may imply feelings related to stage fright or anxiety before a performance. They also reward a good rehearsal performance by throwing their shoes on the dance floor once a number is completed.