In support of FumbleFingers's conclusion that the expression "stick it to [someone]" originally meant beat someone with a stick, I note the following item titled "A Nice Little Fight," in the [Ebensburg, Pennsylvania] Mountain Sentinel (August 7, 1851), in which the writer uses the phrase immediately after to referring to a (figurative) "drubbing":
The Whigs of Somerset, Bedford and Fulton are in a bad fix. Hamilton B. Barnes, Esq., of Somerset, has been nominated for the State Senate by the Whigs of that district, and Saml. W. Pearson, Esq., has been announced as the Independent Whig candidate. Francis Kimmell, Esq., has been nominated for President Judge of the above counties and Franklin, and Wm. Lyon, Esq., of Bedford has also received a sort of nomination. They are both Whigs. Mr. Kimmell is the best qualified for the station if a Whig is to be elected we hope he will succeed. Mr. Lyon is one of your fourth rate lawyers and seems to be little thought of even in his own county. We intend to look on and will from time to time notice the drubbing that the Bedford Inquirer receives from the Somerset Herald and Whig. Stick it to him Ogle.
This instance is slightly older than the one cited by FumbleFingers from F. Colburn Adams, Manuel Perreira; or, The Sovereign Rule of South Carolina (1853). But another instance is eleven years older than the one in the Mountain Sentinel. From a letter to the editor of The Stockholder, reprinted in the [Fayette, Missouri] Boon's Lick Times (June 6, 1840):
There is one view of the approaching election for Governor which is having its effect here, and which is entitled to as much or more consideration than any other involved in the canvass. When Judge Reynolds passed through this county he was careful to let "the party" know that he would "stick it to the Whigs" in the Judgeship, if he was elected, at the same time insinuating that Clark could not be trusted on that score. Clark declared emphatically and publicly that if he was elected he would "seek out the best legal talents without regard to party." ... We have all here just witnessed the total unfitness of the party Judge which has been sent to us--unfit by nature as well as education--and I never had more respect for any man than for the independent and steady minded Democrat who started and stated this view of the case to his brethren. It will work well in Randolph, at least--teaching Gov. Boggs what the Democrats think of him and teaching the would-be Gov. Reynolds that there are at least a portion of the democracy of this County who seek something more substantial in electing their Governor than merely to "stick it to the WHIGS" on the Judgeship. They feel, that on this life [tenure] business of a Judge, what "sticks it to to the Whigs" sticks it to them and their children. Will not the same view prevail in your County and throughout the Circuit? I would think so.
An Elephind newspaper database search turns several additional instances from the 1850s. From "My Course on the Proviso," in the [Indianapolis] Indiana State Sentinel (November 14, 1850):
Mr. Toombs, on or about the 13th day of December last, made a violent speech, in which h charged the whole North with being abolitionists, and invoked a union of the South against the North in the election for Speaker. He eulogised [Zachary] Taylor as a true Southern man. I confess that in the moment of excitement, I would have been willing to have seen him tested, and I so wrote to several gentlemen. These letters were private, and generally referred to what i should do if instructed. An extract from one of these letters is hunted up and published in the Statesman, in which I am made to say: "Pass the Wilmot Provise and we will stick it to Old Zack." I do not know the name of the person to whom it was addressed. I only know that about that time I determined to to vote for the Proviso if instructed. It was a private letter, and the member who handed it over to Ellis to publish was guilty of an act which should disgrace him in the eyes of all gentlemen.
The original private letter, written in late 1849, with the punchline "stick it to old Zack," is quoted in multiple Indiana newspaper articles in 1850, 1854, and 1856, and makes a final appearance in the Evansville [Indiana] Daily Journal in July 1860.
From "National Republican Convention—A Laugh-Producing Performance—The Saw-Log Man's Speech," in the Richmond [Indiana] Palladium (March 6, 1856):
As I said to Horace Greeley, one when we was a talking about these Know Nothing's and he abused 'em pretty awful too; says I—
"Friend Horace, have they done any good."
"Why yes," says Horace.
"Well then," says I, "touch 'em light!"—(More convulsions [from the highly amused audience].)
"But," says I, "Horace, if they do any thing bad——"
Voice—stick it to 'em!
Ripley—Yes, that's it!
From "Ione Valley," in the [Jackson, California] Amador Ledger-Dispatch (July 3, 1858):
Cool.—About 1 or 2 o'clock last Thursday, when it was scorching hot, Martin Stickler stuck himself into this office, bearing a huge pitcher of an iced beverage that was most excellent to take. Martin, may the boys stick to you as long as they have the dinero, but not stick it to you afterwards! The new saloon is having a run.
And from "The Illinois Campaign: Douglas Among the People," in the Memphis [Tennessee] Daily Appeal (September 3, 1858), reprinted from the Chicago [Illinois] Times:
Mr. DOUGLAS—It is true he [Abraham Lincoln] gives the abolitionists to understand by a hint that he would not vote to admit such a State [one that permitted the institution of slavery]. And why? He goes on to say that the man who would talk about giving each State the right to have slavery, or not, as it pleased, was akin to the man who would muzzle the guns which thundered forth the annual joyous return of the day of out independence. (Great laughter.) He says that that kind of talk is casting a blight on the glory of the country. What is the meaning of that? That be is not in favor of each State having the right to do as it pleases on the slavery question? ("Stick it to him"—"don't spare him," and applause.) I will put the question to him again and again, and I intend to force it out of him. (Immense applause.)
Elsewhere in this article, partisans of Stephen Douglas are quoted as shouting such similar expressions of support during his speech as "Strike him [Lincoln] again," "Rake him down," and "Hit him again, three cheers."
Conclusions
Various searches turn up seven instances of "stick it to [someone]" from 1840 and 1858 in U.S. states ranging from Missouri, to Indiana (twice) to Pennsylvania to South Carolina to California to Tennessee (by way of Illinois). These instances consistently use the expression either explicitly in the figurative sense of "beat someone with a stick" or in a context where such a meaning makes perfect sense.
A striking contrast appears in an instance from "New Zealand Journal Kept by Two British Officers, (Captains Wilmot and Nugent,) on Their Overlnd Route from Wellington to Auckland,—1846," in the [Sydney, New South Wales] Australian (September 3, 1846), reprinted from The New Zealander (July 4 and 8, 1846):
[May] 24th. The 'Ogre' was detected this morning stealing tobacco out of our box, which he hastily put back when discovered, saying that he merely wished to see whether we really had sufficient tobacco to pay him or not; he however managed to hide some. After a long search among the rushes, a canoe was found, but so leaky that it would not float. They managed at last to caulk it with grass and mud; in performing which Peter stole a knife that was lent to him, saying that it had fallen into the river, he was seen dexterously to stick it to the 'Ogre's' slave. They now put our baggage into the canoe, and the slave paddled us across, leaving our two friends on the other side.
In this British military usage "stick it to [someone]" seems to mean something like "slip it clandestinely to [someone]." In any event the knife in this case is literal, and the context does not suggest stabbing or using an adhesive to do the "sticking." (Later in the same entry, the Ogre's slave paddles the two British officers across a river and then returns to ferry the Ogre across. Peter, the Ogre, and the Ogre's slave all appear to be Maoris.
The New Zealand instance, although quite early (1846) comes six years after the Missouri instance of "stick it to the Whigs." I see no reason to assume that the two forms share a common origin, given that none of the U.S. instances from 1840–1858 use "stick it to [someone]" in the way that the New Zealand instance does.