World Wide Words explains that the “original dilemma in rhetoric was a device by which you presented your opponent with two alternatives…” The opponent loses the argument regardless of the response. A famous example is “Have you decided to stop beating your wife?”
The origin of the expression goes back to as early as the mid-fifteen hundreds in which a scholar says “…it doesn’t matter which of the two points a person made a direct answer, either way he would run on to the sharp of the horn.”