The modern slang expression “to lay an egg” has no bearing whatsoever upon the output of a hen.
It means, “to fail; to flop; to fail to produce an intended result.”
The “egg” in the expression is shortened from the older slang meaning of “goose-egg,” which, in sporting circles, means a cipher, a nought, a zero, from the resemblance of the outline of the egg to a cipher, o.
In an inning of baseball, for example, the score of a team which has no runs is shown by the figure o, a cipher. That team “lays an egg.”
“Goose-egg” in this sense had attained some degree of respectability by 1886, for in that year it is recorded that the New York Times, in reporting a baseball game, said, “The New York players presented the Boston men with nine unpalatable goose eggs in their contest on the Polo Grounds yesterday.”
The American usage, however, is merely a transference from the British “duck” as the layer of such eggs, for, as readers of Charles Reade’s Hard Cast, will discover, as long ago as 1863 and earlier, the British were describing one who failed to score at cricket as having “achieved a duck’s egg.”
Sports writers of today leave the bird nameless.