1670s, "person arraigned for a crime or offense," according to legal tradition from Anglo-French cul prit, a contraction of Culpable: prest (d'averrer nostre bille) "guilty, ready (to prove our case)," words used by prosecutor in opening a trial. See culpable. It seems the abbreviation cul. prit was mistaken in English for an address to the defendant.
Meaning "a criminal, an offender" (1769) is, according to OED, "A change of sense, apparently due to popular etymology, the word being referred directly to L. culpa fault, offense."