Attested 1665, by which point already in common use; perhaps of naval slang origin.
While it is frequently stated that the phrase is derived from cat-o'-nine-tails, this latter term is only attested from 1695, and hence this idiom presumably derived from literally swinging a cat around, as by the tail.
Modern English dictionary
Explore and search massive catalog of over 900,000 word meanings.
Word of the Day
Get a curated memorable word every day.
Challenge yourself
Level up your vocabulary by setting personal goals.