"to insist on payment of debt," 1620s, also as a noun, "agent employed to collect debts," of uncertain origin, perhaps related to Middle English dunnen "to sound, resound, make a din" (c. 1200, dialectal variant of din), or shortened from dunkirk (c. 1600) "privateer," a private vessel licensed to attack enemy ships during wartime, from Dunkirk, the French port from which they sailed. The oldest theory traces it to a Joe Dun, supposedly a London bailiff famous for catching defaulters. Related: Dunned; dunning. As a noun from 1620s.
Old English dunn "dingy brown; dark-colored," perhaps from Celtic (compare Old Irish donn "dark;" Gaelic donn "dull; dark brown; dark;" Welsh dwnn "brownish"), from PIE *donnos, *dusnos "dark." As a noun, "dun color," 1560s; as "a dun horse" from late 14c. The "horse" meaning is that the figurative expression dun is in the mire "things are at a standstill or deadlocked," which occurs in both Chaucer and Shakespeare. Dun also is likely the origin of the surnames Dunn, Dunne, Donne, Dunning, etc.