late 14c., "open disregard or disobedience" (of authority, the law, etc.); general sense of "act of despising, scorn for what is mean, vile, or worthless" is from c. 1400; from Old French contempt, contemps, and directly Latin contemptus "scorn," from past participle of contemnere "to scorn, despise," from assimilated form of com-, here probably an intensive prefix (see com-), + *temnere "to slight, scorn, despise," which is of uncertain origin.
De Vaan has it from PIE *tmn(e)- "to cut," with cognates in Middle Irish tamnaid "cuts," Greek tamno (Attic temno) "to cut;" Lithuanian tinti "to whet," colloquially to beat;" archaic Russian tjat' "to beat." He adds, "The compound contemnere is the older verb, from which temnere has been backformed more recently. The etymology is disputed: the meaning 'scorn' has probably developed from a more concrete meaning ...."
Latin also had contemptrix "she who despises." Phrase contempt of court "open disregard or disrespect for the rules, orders, or process of judicial authority" is attested by 1719, but the idea is in the earliest uses of contempt.