1570s in the literal sense of "grass seed shaken out of hay," from hay + seed (n.). In U.S. slang sense of "comical rustic" it dates from 1875. To have hayseed in (one's) hair was a common mid-19c. way in U.S. to indicate a country person.
The opinion of the court was delivered by Justice Hunt; the chief justice, in whose hair the Ohio hayseed still lingers, delivering a dissenting opinion (etc.) ["The Chronicle," New York, Nov. 12, 1874]
Rural; provincial: The bad actors perform worse plays in hayseed theatersnoun
(also hayseeder)A farmer; country person: There's still a lot of hayseed in Senator Chance (1888+)