It’s often hard to find when a classic math problem was first posed. As for squaring the circle, MacTutor traces it back to before Aristophanes’ wacky comedy The Birds:

The first mathematician who is on record as having attempted to square the circle is Anaxagoras. Plutarch, in his work On Exile which was written in the first century AD, says:

“There is no place that can take away the happiness of a man, nor yet his virtue or wisdom. Anaxagoras, indeed, wrote on the squaring of the circle while in prison.”

Now the problem must have become quite popular shortly after this, not just among a small number of mathematicians, but quite widely, since there is a reference to it in a play The Birds written by Aristophanes in about 414 BC. Two characters are speaking, Meton is the astronomer.

Meton: I propose to survey the air for you: it will have to be marked out in acres.

Peisthetaerus: Good lord, who do you think you are?

Meton: Who am I? Why Meton. THE Meton. Famous throughout the Hellenic world - you must have heard of my hydraulic clock at Colonus?

Peisthetaerus (eyeing Meton’s instruments): And what are these for?

Meton: Ah! These are my special rods for measuring the air. You see, the air is shaped - how shall I put it? - like a sort of extinguisher: so all I have to do is to attach this flexible rod at the upper extremity, take the compasses, insert the point here, and - you see what I mean?

Peisthetaerus: No.

Meton: Well I now apply the straight rod - so - thus squaring the circle: and there you are. In the centre you have your market place: straight streets leading into it, from here, from here, from here. Very much the same principle, really, as the rays of a star: the star itself is circular, but sends out straight rays in every direction.

Peisthetaerus: Brilliant - the man’s a Thales.

Now from this time the expression ‘circle-squarers’ came into usage and it was applied to someone who attempts the impossible. Indeed the Greeks invented a special word which meant ‘to busy oneself with the quadrature’. For references to squaring the circle to enter a popular play and to enter the Greek vocabulary in this way, there must have been much activity between the work of Anaxagoras and the writing of the play. Indeed we know of the work of a number of mathematicians on this problem during this period: Oenopides, Antiphon, Bryson, Hippocrates, and Hippias.