The phrase to knock (also to beat, to kick, etc.) seven bells out of somebody means: to give a severe beating to somebody.
In this phrase, which originated in nautical slang, the noun bell refers to the bell which is struck on shipboard, every half hour, to indicate by the number of strokes the number of half-hours of the watch which have elapsed—hence also the nautical use of the noun bell to designate a period of half-an-hour thus indicated.
The following explanations are from page 94 of The Sailor’s Word-Book: An alphabetical digest of nautical terms, including some more especially military and scientific, but useful to seamen; as well as archaisms of early voyagers, etc. (London: Blackie and Son, 1867), by William Henry Smyth (1788-1865) and Edward Belcher (1799-1877):
BELL. Strike the bell. The order to strike the clapper against the bell as many times as there are half hours of the watch elapsed; hence we say it is two bells, three bells, &c., meaning there are two or three half-hours past. The watch of four hours is eight bells.
The earliest occurrences that I have found of this nautical use of the noun bell are from The Recapture of the Hermione, published in Tough Yarns; A Series of Naval Tales and Sketches to Please All Hands, From the Swabs on the Shoulders down to the Swabs in the Head. By The Old Sailor, Author of “Greenwich Hospital,” &c. Illustrated by George Cruikshank (London: Effingham Wilson, 1835), by the English sailor and author Matthew Henry Barker (1790-1846):
[page 69] “At two bells, instead of calling the watch, the hands were turned up and all ordered aft on to the quarter-deck, where the captain was standing as upright as a fathom of smoke in a calm, and the master was bent down like a yard of pump-water measured from the spout, and looking over a chart of the harbour, as busy as the devil in a gale of wind.”
[…]
[page 72] “It was just about eight bells when the mast-heads of the Harmoine showed above the dark mass of land, and the light rigging looked like a fine spider’s web traced on the silvery sky.”
[…]
[page 73] “Whilst they were fighting for possession on deck, the sails were loosed aloft, the cables were cut, and the boats were towing the ship out of the harbour; and the craft, as if she knew she warn’t honestly come by, was walking off from the land like seven bells half-struck;—if that warn’t going the rig, then blow me if I know what is.”
The phrase like seven bells half-struck, used by Matthew Henry Barker in The Recapture of the Hermione, was explained by a person signing themself ‘Bolt-Rope’ in the following letter to the Editor, published in Aris’s Birmingham Gazette (Birmingham, Warwickshire, England) of Monday 29th November 1847 [page 3, column 4]:
Sir—Allow me to point out a “leetle” error in the letter of the “London Correspondent” of the Birmingham Journal of this day. Speaking in nautical style of the way in which Sir Robert Peel lets go his anchor in the House of Commons, and then, as soon as a suspicious craft heaves in sight and shows his colours, how he (Sir R. Peel) shifts his berth by getting out of the way immediately, the writer says […] “he finally clawed off the shore towards nine bells!” Query, what hour might this be? We only go up to eight bells, which is either four, eight, or twelve o’clock, one bell being half past, two bells one o’clock, and so on up to four o’clock, when the same number is observed again; thus, six bells (or any other) in the first, middle, or morning watch. Nine bells may do for those in a Midland town, or for the Marines, but not for those who read from the Times daily the account of “Naval Intelligence,” about which this gentleman spoke in such ironical terms a few weeks ago as a subject “not much understood by a Midlander.” In the words of an old simile on board a ship, he might have said that he sheered off, or started on end, like seven bells half struck—implying that he (Sir R. Peel) got out of the way with as much speed as possible.
The following explanation of the phrase to knock seven bells out of somebody is from the Oxford English Dictionary (online edition, December 2023):
Apparently originally with allusion to the nautical tradition of sounding ‘eight bells’ to mark a sailor’s death (i.e. sounding the ship’s bell eight times, the usual signal for the end of a watch); hence ‘seven bells’ would carry the implication ‘almost to death’.
However, nothing in the texts containing the earliest uses of the phrase to knock seven bells out of somebody supports this explanation.
My own hypothesis is that, in this phrase, the adjective seven is simply an intensifier that was chosen arbitrarily.
—Cf. also the probable origin of ‘one over the eight’ (one drink too many).
My hypothesis seems to be supported by the fact that the following three phrases apparently predate to knock seven bells out of somebody:
1-: The nautical phrase like seven bells half-struck, meaning with as much speed as possible—cf., above, the quotations from The Recapture of the Hermione and from the letter by ‘Bolt-Rope’.
2-: The nautical phrase to flog somebody like seven bells, meaning to give a severe beating to somebody—cf., below, the quotation from the Literary Cadet, and Saturday Evening Bulletin (Providence, Rhode Island, USA) of Saturday 1st July 1826.
3-: The nautical phrase to blow seven bells, meaning to blow a violent gale—cf., below, the quotation from The Charleston Courier (Charleston, South Carolina, USA) of Thursday 27th May 1841.
—Cf. also the phrase to blow great guns, meaning to blow a violent gale, which a certain A. De Morgan defined as “a simple monster of comparison” in Notes and Queries: A Medium of Inter-Communication for Literary Men, Artists, Antiquaries, Genealogists, etc. (London, England) of Saturday 9th November 1861.
The earliest occurrence that I have found of the nautical phrase to flog somebody like seven bells, meaning to give a severe beating to somebody, is from the Literary Cadet, and Saturday Evening Bulletin (Providence, Rhode Island, USA) of Saturday 1st July 1826 [page 2, column 4]:
“A sailor’s life’s the life for me.
He takes his duty merrily.
If winds can whistle, he can sing
Still faithful to his friend and king.
He gets beloved by all the ship,
He toasts his girl and drinks his flip.” Dibdin.
Thus sung Ned Block, a merry old Jack Tar, as he descended from the gallery of the Theatre last Wednesday night, and the old sea dog, just paid off from a long cruise, was about proceeding to pay a visit to his Poll, when a rude voice exclaimed from the opposite side of the street, “Avast there, my hearty—blast my flipper if you sing that right.” “May-be I dont [sic] then, you land-lubber,” replied Ned—“away there with your nonsense, or by the cat-head of the Mary-Done-Over, I’ll throw the spread eagle over your dead-lights, my old boy.”
So said, so done—’twas enough—they grappled, and one broad-side brought the weather-beaten sons of the ocean to the pavement. As they lay wallowing in the mud, the light of the adjacent lamp flickered on their faces, and Ned Block, with a phiz streaming with blood, turned his quid and exclaimed—“If I ar’nt grappled with Tom Hamper of the Saucy Jack, splice me to a dolphin.”—“The same,” responded Tom Hamper, “and by the Pipers of Linster, I’d a mind to flog ye like seven bells—but if I give you the weight of a marlinspike now, may I never again see Kate Bantline of Portsmouth Alley.”
The earliest occurrence that I have found of the nautical phrase to blow seven bells, meaning to blow a violent gale, is from an unsigned letter to the Editors, published in The Charleston Courier (Charleston, South Carolina, USA) of Thursday 27th May 1841 [page 2, column 4]:
On Wednesday afternoon, the 19th inst., while two gentlemen were sailing about the harbour in an open boat, they were overtaken by the squall that passed over this place at that time. […] Fortunately, however, the Revenue Cutter was lying at anchor within one hundred yards from them […]. After contending with the wind and waves (rowing) for a short time, they succeeded in getting aboard […].
It would be but “labour lost” to attempt a description of the scene, which was presented to the eye from the deck of the Cutter. The wind was at its maximum, the waves in their fury began to lash the sides of the beautiful little vessel; the officer in command, Lieut. Harby, (the Captain being on shore at the time,) with trumpet in hand, was giving his orders in a clear and manly tone […]. He was so cool, so prompt, and so decisive in his orders, and, apparently, so little apprehensive of danger, that his guests, although it was blowing “seven bells,” and the forward deck of the vessel was completely washed with the spray, summoned courage enough to retire to the cabin, where they were regaled with some excellent Madeira and a fine supper.
Finally, the earliest occurrence that I have found of the nautical phrase to knock seven bells out of somebody is from The New York Herald (New York City, New York, USA) of Saturday 13th January 1844 [page 1, column 5]—Rapelja is a misprint of Rapelje:
U. S. Marshal’s Office.
Before Mr. Commissioner Rapelja.
Jan. 12.—[…] Assault and Battery on the High Seas.—William W. Benson, the mate of the American brig, “Morea,” was brought up again to-day on another warrant for an assault and battery committed by him on the person of Peter Bragg, a seaman, with a dangerous weapon on the 13th December last past.
[…]
By Alderman Tillou.—I did not see Bragg turn up his sleeves, nor did I see him make a pass at the mate; he might have made a pass at him without my seeing him. I heard Linden, as he came out of the forecastle, say that he would knock “seven bells” out of the mate. Linden in a good many ways was abusive and disrespectful to the officers.
—Cf. also, probably modelled on to knock seven bells out of somebody: to frighten seven bells out of somebody, meaning to terrify somebody.