c. 1300, "despite, contempt," from Old French prejudice "a prejudice, prejudgment; damage" (13c.) and directly from Medieval Latin prejudicium "injustice," from Latin praeiudicium "prior judgment, judicial examination before trial; damage, harm," from prae- "before" (see pre-) + iudicium "judgment," from iudex (genitive iudicis) "a judge" (see judge (n.)).
Meaning "injury, physical harm" is mid-14c., as is the legal sense of "detriment or damage caused by the violation of a legal right." Meaning "preconceived opinion" (especially but not necessarily unfavorable) is from late 14c. in English; now usually "decision formed without due examination of the facts or arguments necessary to a just and impartial decision." To terminate with extreme prejudice "kill" is by 1972, said to be CIA jargon.