A longstanding question on English Language & Usage asks "Compared with" vs "Compared to"—which is used when? and has drawn several useful answers. But the question doesn’t invite answers to questions about the origin of the rule itself.
Webster's Dictionary of English Usage (1989) dedicates more than two full pages to a discussion of compare to versus compare with. In the course of its discussion, WDEU cites a letter written by Theodore Bernstein to the editor of Word Study in 1947, asserting that the rule about when to use compare with and when to use compare to first appeared in Webster's American Dictionary of the English Language (1847). Here is the 1847 Webster's dictionary's entry for compare as a verb:
COMPARE, v. t. ...
1. To set or bring things together in fact or in contemplation, and to examine the relations they bear to each other, with a view to ascertain their agreement or disagreement ; as, to compare two pieces of cloth, two tables, or coins ; to compare reasons and arguments ; to compare pleasure with pain.
In comparing movable things, it is customary to bring them together, for examination. In comparing things immovable or remote, and abstract ideas, we bring them together in the mind, as far as we are able, and consider them in connection. Comparison therefore is really collation, or it includes it.
2. To liken ; to represent as similar, for the purpose of illustration.
Solon compared the people to the sea, and orators and counsellors to the winds ; for that the sea would be calm and quiet, if the winds did not trouble it. Bacon.
In this sense compare is followed by to.
3. To examine the relations of things to each other, with a view to discover their relative proportions, quantities, or qualities ; as, to compare two kingdoms, or two mountains, with each other ; to compare the number ten with fifteen ; to compare ice with crystal ; to compare a clown with a dancing-master or a dandy.
In this sense compare is followed by with.
WDEU focuses its attention on twentieth-century usage, so it doesn’t reach any conclusion about whether the rule spelled out by Webster's 1847 dictionary reflected actual practice or only the preferences of Noah Webster. It concludes that current (in 1989) practice in English is (on the one hand) to use compare to "more often than not" when the sense of the active verb is "liken" but (on the other) to use compared to and compared with "about equally after the past participle" when the sense of the verb is "examined so as to discover the resemblances and differences."
Without getting too caught up in the side issue of whether common usage ever definitively supported the rule that appears in Webster’s 1847 dictionary, I would like to know two things:
When was the rule about when to use compared to and when to use compared with first set down in a published work?
Who was the author of that first statement of the rule?