Keelhauling was a form of naval punishment. Sailors would be tied to a rope and thrown overboard, being dragged under the ship and the sea.
Threatening an individual with keelhauling was used in the 23rd and 24th centuries in a humorous way. (DS9 episode: "Rapture", TOS novel: The Empty Chair)