An individual who turns out to be rotten, as in
You can't trust him-he's simply a bad egg. Although
egg had been used for various kinds of person (young, good, bad) since Shakespeare's day, this transfer of a seemingly wholesome food that, when opened, turns out to be rotten took place only in the mid-1800s. An early definition appeared in
The Atheneum of 1864: "A bad egg ... a fellow who had not proved to be as good as his promise." In contrast, the schoolyard saying
Last one in is a rotten egg does not have any special significance other than as a way of urging others to join an activity, jump in the water, or the like. Also see
good egg.