1620s, "distinguish from something else or from each other, observe or mark the differences between," from Latin discriminatus, past participle of discriminare "to divide, separate," from discrimen (genitive discriminis) "interval, distinction, difference," derived noun from discernere "to separate, set apart, divide, distribute; distinguish, perceive," from dis- "off, away" (see dis-) + cernere "distinguish, separate, sift" (from PIE root *krei- "to sieve," thus "discriminate, distinguish").
The adverse sense, "make invidious distinctions prejudicial to a class of persons" (usually based on race or color) is first recorded 1866 in American English. Positive sense remains in discriminating. Related: Discriminated.