c. 1300, doseine, "collection of twelve things or units," from Old French dozaine "a dozen, a number of twelve" in various usages, from doze (12c.) "twelve," from Latin duodecim "twelve," from duo "two" (from PIE root *dwo- "two") + decem "ten" (from PIE root *dekm- "ten"). The Old French fem. suffix -aine is characteristically added to cardinals to form collectives in a precise sense ("exactly 12," not "about 12").
The Latin word's descendants are widespread: Spanish docena, Dutch dozijn, German dutzend, Danish dusin, Russian duizhina, etc. The dozens "invective contest" (1928) originated in slave culture, the custom is probably African, the word probably from bulldoze (q.v.) in its original sense of "a whipping, a thrashing."