late 12c., fulthe, "corrupt, sinful," from filth + -y (2). Meaning "physically unclean, dirty, noisome" is from late 14c. Meaning "morally dirty, obscene" is from 1530s.
In early use often hardly more emphatic than the mod. dirty; it is now a violent expression of disgust, seldom employed in polite colloquial speech. [OED]
Related: Filthily; filthiness.