The story
One early use is in Hector Urquhart's Popular Tales of the West Highlands (1860s) where he wrote "one man's rubbish may be another's treasure".http://english.stackexchange.com/questions/60429/ddg#60472
Etymology from Wiktionary, CC BY-SA 4.0.