Horse trading, in its literal sense, refers to the buying and selling of horses, also called "horse dealing". Due to the difficulties in evaluating the merits of a horse offered for sale, the sale of horses offered great opportunities for dishonesty, leading to use of the term horse trading (or horsetrading) to refer to complex bargaining or other transactions, such as political vote trading. It was expected that horse sellers would capitalize on these opportunities and so those who dealt in horses gained a reputation for underhanded business practices.
As standards for ethical business declined in the United States in the Gilded Age, the activities of horse traders came increasingly to be seen as the natural and, in part, desirable product of a competitive market rather than as symptoms of moral depravity. In an 1893 New York Times editorial criticizing a proposed law to make it illegal for a newspaper to falsely state its circulation figures, the author declared that "if the lying were stopped by law, the business of horse trading would come to an end, and the country taverns and groceries in the Winter season would be deprived even of the limited eventfulness which they now enjoy".
Reflecting this attitude, the term horse trading was widely adopted as a way to describe what might be seen as unethical business practices in a more positive light. It is likely the 1898 publication of Edward Noyes Westcott's David Harum – whose title character saw all business through the lens of horse trading – played a key role in this.
In a further development of meaning, horse trading has come to refer specifically to political vote trading. This is now the most common sense of the term, largely displacing the older term, logrolling.