In politics, and sometimes business, someone in a powerful position who everyone knows will be leaving office at a particular time, but who is still in office, is called a lame duck. This is "lame" not in the sense of uncool, but in the sense of powerless due to injury.
In other words, the lame duck is unable to exert power over others because the knowledge he or she will be departing - and therefore, has less and less power to punish others for defiance with each day that passes - reduces the psychological and leadership power of that person.
Note that while being a lame duck is related to an impending departure, many people only call someone a lame duck when that person's power enters pronounced decline, a little like "jumping the shark."
Example: An American President in his second term eventually experiences an erosion in his ability to make Congress do what he wants, losing influence with even members of his own party. Due to strongly established tradition and the great difficulty of changing the constitution, the limit to two terms of four years is virtually unchangeable. Therefore, members of Congress know as a fact that the President will be departing. When the President reaches this point of limited influence, he begins to be called "a lame duck."
Also, the term "lame duck session" (relating to Congress) is a little different. This is the result of two accidents of the American system: 1) members being officially in office even after an election, until the following January (much like Presidents); 2) a modern habit of not completing budgetary business (in the trillions of dollars) within the normally scheduled time.
In 2010, legislating in the "lame duck session" between the November election and the end of 2010 reached new heights, with major pieces of legislation passed, although a giant budget bill was forced to be abandoned (and this is, I must point out, an extremely rare event). Some have questioned the propriety of legislators who have been voted out of office - and are thus "lame ducks" themselves - voting on issues of such importance, but this lack of consequences (they already lost!) has been used to great advantage by the Democratic Party in 2010.
Thus, the lame duck session is so called because departing Congressmen and Senators who are "lame ducks" are still able to use the full power of their offices... which is, again, a kind of accident of the American political system. Traditionally, they are not well regarded.