The phrase 'to know one's onion(s)' first appeared in print at least as early as 1891. Given its historical linguistic context, the 'source' of the phrase may be construed as the independent adoption of a generalized idiomatic response to the equally idiomatic and earlier-evidenced declaration that someone 'does not know the difference between an onion and [another object, commonly another vegetable]'. Both phrases, but particularly the latter, vary freely in individual use, but are loosely formulaic.1
OED (paywalled) defines 'to know one's onions' as "to be experienced in or knowledgeable about something". The OED entry only mentions the plural variant "onions", attested from 1908 (note the slightly earlier appearance of the attestation shown in the compilation below, from January 1908 as compared to February):
1908 Postal Rec. Feb. 27/3 Never mind: Billy knows his onions. He is not troubled with corns or bunions.
The singular variant "onion" was, however, as far as I have discovered, the only variant in print up to 1908. The singular continued in frequent use into the 1920s, when the plural variant gradually came to dominate use. By the mid-1920s, the plural variant was used almost if not entirely exclusively.2
Early attestation of 'know one's onion(s)'
Early appearances of the phrase 'know one's onion(s)' were a regionalism centered on and predominantly from Pennsylvania. Occasional instances were found in the surrounding states of New York, Delaware, and New Jersey, with only one outlier (from Washington State).
All links are paywalled unless otherwise noted.
The Morning Post (Camden, New Jersey) 22 May 1891, Page 1:
Say, Garrett, don't part with Ely, if you know your onion, and we believe you do.
The Evening Journal (Wilmington, Delaware) 06 May 1892, Page 2:
I know my onion, chappies, and doncher forget it — see?
The Morning Post (Camden, New Jersey) 29 Feb 1892, Page 1:
You don't know your onion, Stackey; you oughtn't to pull me in.
The Morning Post (Camden, New Jersey) 05 Apr 1894, Page 1:
This trolley knows her onion and don't you forget it.
The Philadelphia Inquirer (Philadelphia, Pennsylvania) 15 Jun 1898, Page 4:
You must "know your onion" to get your money on right.
The Evening Democrat (Warren, Pennsylvania) 27 Jun 1899, Page 4:
He is a big and busy bug and he knows his own onion and lights on it.
The Seattle Post-Intelligencer (Seattle, Washington)
04 Feb 1900, Page 28:
In cooking onions it is well to first know your onion.
Buffalo Courier (Buffalo, New York) 14 Apr 1900, Page 4:
According to the Binghamton Herald, there is one man in this State who knows 'his onion' as the tough boy says; you can't fool him.
The Selinsgrove Times-Tribune (Selinsgrove, Pennsylvania) 20 May 1903, Page 1:
The people may criticise and damn the old man, but he always knows his onion and rarely makes a mistake.
The New York Times (New York, New York)
07 Jun 1903, Page 6:
"He Knows His Onion."
To the Editor of The New York Times:
Apropos of the discussion of the meaning and origin of "makes no bones," will some slang etymologist let us know the origin and connection of "he knows his onion," meaning he minds his own affairs, or is posted about certain pertinent situstions?
Republican News Item (Laport, Pennsylvania) 25 Jun 1903, Page 1:
The Experimental farmer comes down strong on the butter business, and when he talks about leeks, we have nothing more to say in advice, for it is plain to see that "he knows his onion."
The Index (Pittsburgh, Pennsylvania) 26 Nov 1904, Page 7 (not paywalled):
Not if he knows his onion, and he thinks he does.
Lewisburg Journal (Lewisburg, Pennsylvania) 06 Oct 1905, Page 7:
I know my onion.
Wilkes-Barre Times (Wilkes-Barre, Pennsylvania)
18 May 1907, Page 4 [blurb headline]:
Knows His Onion
The Morning Post (Camden, New Jersey) 26 Oct 1907, Page 11:
It isn't wise for a policeman to say "I never saw the beat." He knows his "onion!" If he made such a remark, in all probability he would not "turn-up" again. He'd get it in the Adam's "apple." That's all!
The Wilkes-Barre Record (Wilkes-Barre, Pennsylvania)
02 Jan 1908, Page 4:
But never mind, Billy knows his onions,
He is not troubled with corns or bunions,
He travels along at a good fair gait;
Unless the roads are bad, he is never late.
O.S. White, (Letter Carrier No. 9),
48 Carey Avenue, Wilkes-Barre, Pa.
Early attestation of 'does not know an onion from a ——'
The Scottsboro Citizen (Scottsboro, Alabama) 01 Feb 1883, Page 2:
The Chattanooga Democrat intimates that a man who doesn't know an onion from a grindstone ought not to have been appointed commissioner of agriculture of Tennessee.
Ellsworth Messenger (Ellsworth, Kansas) 15 Apr 1885, Page 1:
If he should take his garden down to his Great Steam Printing Shop, he had better take Jimmy Jarvis along to weed it, for he himself would not know an onion from a bull nettle.
The Gazette (Montreal, Canada) 22 Jun 1888, Page 8:
He did not know an onion from a cabbage.
Woodland Daily Democrat (Woodland, California)
22 Jul 1890, Page 3:
Thad Spaulding and family are there also, and Thad wouldn't know an onion from a potato to-day.
Northumberland County Democrat (Sunbury, Pennsylvania) 19 Sep 1890, Page 2:
Now that fairs are opening we raise to remark that the horse jockey, who does not know an onion from a turnip, generally gets away with more than his share of the boodle.
The Brooklyn Daily Eagle (Brooklyn, New York) 29 Oct 1899, Page 25:
She didn't know onions from lamp wicks and bunions;
A clam from a lobster, or crab from an eel!
- For purposes of definition, the
formula underlying the former phrase is "know(s) one's X", and the
formula of the latter phrase is "do(es) not know the difference
between X and Y".
- I do not know why the plural
variant came to be preferred to the exclusion of the singular. As a
matter of speculation, I observe that I am slightly more
uncomfortable with the ill-defined referent of the metaphorical
"onion" than I am with the equally ill-defined referents of the
metaphorical "onions". My mild discomfort may be due to what I
consider the stronger likelihood of inappropriate interpretations of
"onion" than of "onions".