"deliberate slight, disparaging remark," c. 1600, from dialectal slur "thin or fluid mud" (Middle English slore, mid-15c.), which is of obscure origin. It seems to be cognate with continental Germanic words having to do with muddy sloppiness, such as Middle Low German sluren, Middle Dutch sloren "to trail in mud." Also compare East Frisian sluren "to go about carelessly," Norwegian slora "to be careless," Middle Dutch slore "sluttish woman."
The sense of "a mark, stain, smear" is from 1660s in English. The earliest appearance of the word in English seems to be as a now-obsolete gambling term for a type of cheat in throwing dice (1590s). And the modern slur might combine senses from two identical words, one meaning fling mud, the other to slip or slide.
From 1796 as the name of a sliding piece in a knitting machine. The musical sense of "combination of two or more tones in a single syllable," indicated by a curved mark, is by 1801. Of speech, the meaning "a slurred utterance, a running together of sounds or words" is by 1861. All these seem to represent the "sliding" sense.