Put the cart before the horse
Reverse the accepted order of things.
The first reference to this phrase in English comes in George Puttenham's The arte of English poesie, 1589:
How can something be, at one, before (pre) and after (post)? preposterous!
"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."
The hysteron proteron that Puttenham noted relates to similar phrases from Greek authors. In grammatical terms a hysteron proteron is a figure of speech in which the thing that should come second is put first; for example, 'putting on one's shoes and socks'. This may be done for literary effect of simply without thought. This form is extended into more general use in phrases like the 2nd century Greek satirist Lucian's 'the cart draws the ox', or Theocritus' 'the hind hunts the dogs'.
Various other phrases that refer to things being the opposite of what they rightfully should be are found in English, notably "the tail is wagging the dog".
The Dutch have a similar proverb - "het paard achter de wagen spannen", i.e. "harness the horse after the wagon".