Note: The origins for many phrases and sayings are unclear. While it's not the case for every phrase, when it does happen, what I'll usually do instead is list the popular or plausible sounding theories that are around that try to discern how a phrase may have come about. Keep in mind, though, that these are merely theories.
Additionally, the quotes you see on every saying's page typically come from old books, poems, or newspapers. These quotes are there to give you an idea on at least how far back in time some of these idioms go.
To bring up an issue that has already been concluded; something that's considered to be pointless.
If an argument erupts and it's one that has been previously settled, then the idiom
"beating a dead horse" might be said by someone who sees any further discussion on the topic to be meaningless.
This phrase may originate with horse racing, where horses are sometimes hit or "beaten" by their riders to get them moving faster. Depending on the rules, a jockey usually has access to a riding crop, which looks sorta like a miniature whip, and this is used to slap the horse on the thigh. The horse responds either by running faster, or probably not at all if it's too tired.
While there is much controversy involved with how horses should be treated during a race, the purpose of "beating" horses during races is to make them run faster. What if the horse were dead, though? There's no point in beating a dead horse. Thus, perhaps the origins of this come from jockeys hitting their horses during a race.
This idiom goes back to at least 1859, as a written form of it is in the Watchman And Wesleyan Advertiser newspaper from London. Inside, there's an article that reads:
"It was notorious that Mr.Bright was dissatisfied with his winter reform campaign and rumor said that he
had given up his effort with the exclamation that it was like flogging a dead horse."
Flogging is another word for beating.
* Why do you insist on beating a dead horse by bringing up these old problems of ours?
* Blake wanted to debate with his friends about which of the two cars had better gas mileage, but they said the argument would be like beating a dead horse.