Way back in Revolutionary times, perhaps earlier, there was a woodsman maxim, “Never waste powder on a dead duck.”
From that, “dead duck” became popular slang, still in use, for anything , person or article, that is no longer worth a straw, that is done up, played out.
Some bright wit a hundred years ago, probably a political writer with that slang term in mind, saw a chance for an apt modification, and gave us the term “lame duck”.
By the law that then existed (revised by the Twentieth Amendment, February 6, 1933), members of Congress who might fail of re-election in November, nevertheless still held office until March 4th following.
Such outgoing “ducks” were not yet “dead,” merely “lamed”; they could still, if sufficiently numerous, pass or propose legislation embarrassing to an incoming administration.