This was posted by a friend of mine on Facebook, from the Philadelphia Evening Item of April 16, 1883:
“The Origin of ‘Dude’
“The recently famous ‘dude’ has been in common use in the little town of Salem, N.H., for the last twenty years. The people there apply the word to those bucolic swains who aspire to be village fops. All such conceited and brainless young men are spoken of as ‘dudes,’ the word being pronounced in two syllables. How the word became transported to the metropolis, and why it attained such a sudden popularity, are questions that a philologist alone can fully solve.”
My first reaction was deep skepticism. Upon consideration, I revise this. “Dude” had only recently come into vogue. The earliest known citation is from just two months earlier. Barry Popick and Gerald Cohen published a long examination of the subject, which I have not read. I have read, however, Allan Metcalf’s summary at Lingue Franca https://www.chronicle.com/blogs/linguafranca/2013/10/21/dude/. He includes this:
Thanks to Popik and Cohen’s thorough investigation, it seems almost certain that “dude” derived from “doodle,” as in “Yankee Doodle Dandy.” The original New England Yankee Doodle, Cohen notes, “was the country bumpkin who stuck a feather in his cap and called it macaroni; i.e., by sticking a feather in his cap, he imagined himself to be fashionable like the young men of his day known as ‘macaronis.’”
The Evening Bulletin claim seems consistent with this, even to the point of the word originally having two syllables, the second being gradually softened into extinction.