Flogging a dead horse
Attempting to revive an interest which has died out; engaging in fruitless effort.
The original meaning of 'a dead horse', apart from the literal 'horse that has fallen off its perch', was a reference to work for which a person had been paid in advance (and possibly had already spent the proceeds). This dates from the 17th century and is referred to in Richard Brome's play The Antipodes, first performed in 1638 and printed in 1640:
He cur'd a country gentleman that fell mad
For spending of his land before he sold it;
That is, 'twas sold to pay his debts - all went
That way for a dead horse, as one would say!
Our present meaning, in the phrase 'flog a dead horse', is quite different. This is a reference to something that is entirely pointless and cannot result in any productive end. The phrase, which is also sometimes expressed as 'beating a dead horse', appeared in print in 1859, in the report of a UK parliamentary debate involving Francis Wemyss-Charteris Douglas, eighth earl of Wemyss and sixth earl of March - who was better known as Lord Elcho. It was reported in Hansard's parliamentary debates, Volume 153. 1859:
If the hon. Member for Birmingham [John Bright] had been present, he would have asked the hon. Gentleman [Lord Elcho] whether he was satisfied with the results of his winter campaign. It was notorious that he was not, and a saying was attributed to him that he found he was "flogging a dead horse."
Whether Lord Elcho was the originator of the phrase, we can't tell, but no earlier use of it in print has yet come to light.