Depictions of mimics have actually been found in early neolithic cave paintings. They show groups of men returning from the hunt only to be devoured by a treasure chest made of sticks and rocks.
I’m honestly not sure where it originated, but I think the earliest known reference is in D&D. A quick google search tells me it was in the original AD&D manual, which would put it at 1977. I know it appears in the SRD, which means it’s not a D&D-original “trademarked monster” (like a Beholder, for example). It was thus probably somewhere in the collective consciousness of the miniatures/wargarming enthusiasts that gave birth to D&D.
That or cave paintings. Though I think the evidence is controversial.