In conflict with what is advanced by Dodge, the New Oxford American Dictionary says: “probably from German dialect Dude (fool)”.
I'd like also to point out “The Meanings and Suggested Etymologies of ‘Dude’”, R.E. Knoll, American Speech, 27 (1), 20–22, 1952, from which Kosmonaut provided the following quotes:
By 1900 the eminent W. W. Skeat had become interested in it and suggested, in a long and erudite note in the British Athenaeum, No. 3806 for October 6, 1900, that dude was an abbreviated form of the German dialect duden-dop, a blockhead, which was a common term of depreciation.
[…][Alfred Nutt] thought that dude more likely derived from a hypothetical Low German dutt or dutte."
[…] Wilson had a further suggestion: a Portuguese word, doudo, a simpleton, a fool, might be related to the English word.
[…] Professor Charles Bundy Wilson, professor of German at the State University of Iowa, had found the word dude in Grimm's Deutsches Worterbuch, Vol. II, col. 1497, defined as 'ein alberner mensch, stupidus'.
[…] Mr. Morrison has generously supplied me with an interesting passage from an article in the Illustrated London News, July 14, 1883, by G. A. Sala, the Victorian litterateur and traveler and man about town. Sala writes:
"From another American paper I learn that the just now popular word, dude- meaning 'an empty-headed, languid-mannered young swell, who bangs his hair'-is no foreign importation, but is of good New England parentage. The word, pronounced in two syllables, is a word that has been used in the little town of Salem, New Hampshire, for twenty years past, and is claimed as coined there. It is common to talk of a dapper young man as a 'dude of a fellow,' of a small animal as 'a little dude,' and of a sweetheart as 'my dude.'"
As Kosmonaut puts it: “The author of the article finds the American origin to be the most compelling.”