1809, "bell attached to the neck of a cow to indicate her whereabouts" (usually oblong and of a dull, heavy tone), from cow (n.) + bell (n.). As a musical instrument (without the clapper) by 1919; in early use associated with, and scorned as an absurdity of, jazz.
Art is long and time is fleeting,
And the man who cannot play,
On a cowbell wildly beating,
Calls it "jazz"--and gets away.
[from "The Psalm of Jazz," Oregon Voter, Aug. 30, 1919]