A strict disciplinarian; so called from the Marquis of Martinet, a young colonel in the reign of Louis XIV., who remodelled the infantry, and was slain at the siege of Doesbourg, in 1672 (Voltaire, Louis XIV., c. 10). The French still call a cat-o'-nine-tails a “martinet.”
The French martinet was a whip with twelve leather thongs.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Martinet from Fact Monster: