mid-15c., "cord, lace, or ribbon of fine material worn as an ornament or token of victory," from Old French cordon "ribbon, cord," diminutive of corde "cord" (see cord). Military sense of "a line of troops or military posts guarding a place" is by 1758.
The original sense is preserved in cordon bleu (1727) "the highest distinction," literally "blue ribbon," for the sky-blue ribbon worn by the old French order of Knights-grand-cross of the Holy Ghost (the highest order of chivalry under the Bourbons). Extended figuratively to other persons of distinction, especially, in jocular use, to a first-rate cook.
Cordon sanitaire (1857) is French, a line of troops or military posts set around an infected district to keep the disease from spreading.
1560s, "to ornament with a ribbon;" 1855 as "to guard with or as with a military cordon;" from cordon (n.). Related: Cordoned; cordoning.