Put the cart before the horse
Reverse the accepted or logical order of things.
The accompanying horse and cart image looks preposterous. That's as it should be as the word 'preposterous' entered the English language precisely to describe such back to front imagery. Of course, 'pre' derives from Latin and is a standard prefix, that is, it is 'at the front'. Likewise, the Latin 'post' means 'at the back', so 'preposterous' actually denotes the normal arrangement of things, with the front at the front and the back at the back. 'Postprerous' might have been a better choice of word but, like 'head over heels', which also makes no sense, it's too late to change now.
An early reference to 'putting the cart before the horse' comes in George Puttenham's The Arte of English Poesie, 1589:
Ye haue another manner of disordered speach, when ye misplace your words or clauses and set that before which should be behind. We call it in English prouerbe, the cart before the horse, the Greeks call it Histeron proteron, we name it the Preposterous.
He was probably referring back to, or possibly translating directly from, a work by Cicero (106 BC - 43 BC) - On Friendship:
"We put the cart before the horse, and shut the stable door when the steed is stolen, in defiance of the old proverb."
A hysteron proteron is a figure of speech we inherited from the Greeks, in which the thing that should come second is put first; for example, 'putting on one's shoes and socks'. It isn't surprising that, when needing an Anglicised proverb to express that notion, the English turned toward what they knew best, that is, agriculture, and in particular, horses. There are more 'horse phrases' in English than those referring to any other animal, including 'man's best friends', dogs.
The notion of things being the opposite of what they rightfully should be seems to have played on the minds of the English at the time when modern English began to be formed, that is, in the 16th century. It is a common theme in Shakespeare and The Tempest, Macbeth and A Midsummer Night's Dream all contain 'world turned upside down' magical elements.
See also: The Preposterous.
See also: the List of Proverbs.