Of American-English origin, the phrase to have, or to keep, an ear, or one’s ear(s), to the ground means to be on the alert regarding rumours or the trend of public opinion.
It is generally—and perhaps erroneously—said to refer to the Native-American practice of putting one’s ear to the ground in order to detect the vibration of sounds in the distance before they can actually be heard. The French author and diplomat François-René de Chateaubriand (1768-1848) mentioned that practice in Voyage en Amérique (Travel in America), first published in 1827:
Les traces ayant été bien reconnues, on met l’oreille à terre, et l’on juge, par des murmures que l’ouïe européenne ne peut saisir, à quelle distance est l’ennemi.
translation from Travels in America and Italy (volume 2 – London, 1828):
The foot-prints having been minutely examined, the Indians clap their ears to the ground, and judge, by murmurs inaudible to a European ear, at what distance the enemy is.
However, the practice of putting one’s ear to the ground is not peculiar to Native Americans, so that the phrase may not specifically refer to them.
The earliest mention of that practice that I have found is from The Northampton Mercury (Northampton, Northamptonshire) of Monday 1st November 1773—this article also appeared in The Pennsylvania Gazette (Philadelphia, Pennsylvania) of Wednesday 19th January 1774 and in The Maryland Gazette (Annapolis, Maryland) of Thursday 27th January 1774:
[The English Traders’] Address in navigating the Indian and the Red-Sea hath given Rise to many important Discoveries in those Parts; and, among the rest, in their Voyages from Moka and Gedda they have discovered the Coast of Abyssinia to be laid down in the Charts 25 to 30 Miles too far West; neither do those Charts mark many small Islands and Rocks, which none can approach without the Assistance off the native Pilots. Notice is given when a Ship arrives, by firing a Gun at the rising of the Sun, and two at its setting, which the Pilots, by laying their Ears to the Ground, declare they can hear at a very great Distance, and in consequence put off in Canoes, and pilot the Ship safely through the Rocks and Shallows into the Red-Sea.
Another early mention of that practice is found in the advice given by “an intelligent Yeoman” to the “brave inhabitants of the Weald of Sussex” in case of an invasion of Britain by the Napoleonic armies, published in The Times (London) of Wednesday 5th October 1803:
“Ten or twelve determined marksmen, knowing the country, will do more service than ten times their number of regular infantry; they will find a coppice a safe retreat from either infantry or cavalry […]. A party formed for this laudable purpose, should, when they halt, post a centinel in a tree to discover the enemy. At night, should the centinel be doubtful of any one’s approach, let him put his ear to the ground.”
The practice of putting one’s ear to the ground was also mentioned in an article about the Cossacks, published in The Washingtonian (Windsor, Vermont) of Monday 15th February 1813:
Some of them can descry, if any movement is taken among a corps of troops, far beyond the reach of usual observation; others, by applying their ears to the ground, can distinguish the buz [sic] of men, or the clattering of horses’ feet at a very considerable distance.
This humorous paragraph was published in the Maryland Gazette (Annapolis, Maryland) of Thursday 24th October 1811:
A gentleman, in this vicinity, planted a field of about an acre with potatoes. While walking, one morning, in this field, he was surprised by a wonderful buzzing which appeared to proceed from among the potatoe vines. He applied his ear to the ground and distinctly heard the potatoes whispering to each other, “Lie further; don’t crowd so.” On uncovering a hill he found, that although there had been but one potatoe thrown into each hill, and the hills had been situated at least 3 feet apart, there was no room in the field for the number which had been produced, and that they had been elbowing and fighting each other until there was scarcely one potatoe with a whole skin.
I have found an early figurative use of the phrase in this advertisement published in the Connecticut Courant (Hartford, Connecticut) of Tuesday 7th November 1815:
TICKETS, HALVES & QUARTERS,
IN Washington Bridge Lottery, for sale at T. HATCH’s Auction-Room, eight rods South of the State-House.
And a going for the small sum of Five Dollars; going, going, going—bid quick, or its [sic] gone. But few more tickets can be sold at prime cost. Remember the 21st November: On that day the wheels will be put in motion—you may put your ears to the ground, and you will hear the great sound of the eagles and dollars roar like the ocean.
Hartford, Nov. 7.
The second-earliest figurative use that I have found is from Address to the Democratic Electors of Massachusetts: Objections to democracy answered, published in the Burlington Sentinel (Burlington, Vermont) of Friday 4th December 1835:
The public opinion which we respect is, indeed, not the opinion of one mind, but of the sagacity of the many. It is hard for the pride of cultivated philosophy to put its ear to the ground, and listen to the voice of lowly humanity, yet the people collectively are wiser than the most gifted individual.
The phrase has given rise to deliberate absurd mixed metaphors, in particular sitting on the fence with both ears to the ground; the earliest instance that I have found is from Public Opinion (Chambersburg, Pennsylvania) of Thursday 23rd May 1940:
The course of Italian diplomacy since the outbreak of the European War was summed up neatly by Howard Brubaker, New Yorker paragrapher, when he said Mussolini was sitting on the fence with both ears to the ground. Developments of recent days in Italy point to possible early abandonment of this difficult position by the Italian leader. The frequency and violence of anti-Allied demonstrations in Italy have been in almost direct proportion to the progress of Hitler’s juggernaut in Belgium and France.