What is the origin of "dirty money"?
The OED specifically traces the term "dirty money" to a source over a century old:
dirty money (n.)
1897 S. Webb & B. Webb Industr. Democracy I. 313 When any class of work involves special unpleasantness or injury to clothing, ‘black money’ or ‘dirty money’ is sometimes stipulated for.
1960 Sunday Express 14 Aug. 1/1, 1,100 dockers‥are claiming ‘dirty money’ for handling a cargo of red oxide.
Yet for some time, dirty has been applied to more than our dirty socks, or a muddy shirt. Dirty has been used to convey sullied, tainted, impure, corrupt, illicit, immoral, etc.
The OED lists such nuances among its several meanings for dirty:
2a. Morally unclean or impure; ‘smutty’. Spec. dirty book, a pornographic book; so dirty bookshop; dirty joke, dirty story, a ‘smutty’ joke or story; dirty weekend, a sexually illicit weekend.
2b. That stains the honour of the persons engaged; dishonourably sordid, base, mean, or corrupt; despicable.
1764 Pulteney in Beatson Nav. & Mil. Mem. (1790) I. 26 Some Ministers‥cannot do their dirty work without them.
With that kind of heritage for the word dirty, it's not a long leap to apply the word dirty to ill-gotten funds.
As a side note, in addition to dirty money, the OED doesn't forget or neglect dirty pool, dirty words, dirty tricks, and dirty old men.
Probably date backs to Tyndale's translation of the Bible in the early 1500s, where aiskhron kerdos (shameful gains) was translated to filthy lucre. The leap from filthy to dirty isn't far at all.
It's a metaphor, or rather a Metaphor Theme.
CLEAN is GOOD ~ DIRTY is BAD
Such a theme licenses reference to anything considered "BAD" by calling it "DIRTY" (somehow), and also licenses reference to anything considered "GOOD" by calling it "CLEAN" (somehow).
- dirty money, filthy mouth, smutty talk, slimy morals, spotty record, ...
- clean living, well-scrubbed manners, fresh ideas, laundered money, ...
Note that last one: laundered money refers to dirty money that's been cleaned, i.e, made officially acceptable by erasing its dirty origins. Rather like Vespasian's famous remark about the tax on urine, familiar to every school boy: Pecunia non olet.
Thomas Mace, Musick's Monument (1676): "And now again methinks I see some of you tossing up your caps and crying aloud, "we will have an organ, and an organist too; 'tis but laying out a little dirty money." (Pt. 1, p. 12)