Where does the term “chestnut” come from and What does chestnut mean?

A “chestnut” is an old joke or oft-repeated story.

The reason for this designation has never been proved, but George Stimpson, in A Book about a Thousand Things (1946), says: “The generally accepted story is that (it) originated in a play entitled ‘The Broken Sword,’ in which the chief characters are Captain Zavier, a Baron Munchausen type of storyteller, and Pablo, a comic person. This play contains the following colloquy:

CAPTAIN ZAVIER: I entered the woods of Collaway, when suddenly from the thick boughs of a cork tree-
PABLO: A chestnut, Captain, a chestnut.
CAPTAIN ZAVIER: Bah, I tell you it was a cork tree.
PABLO: A chestnut; I guess I ought to know, for haven’t I heard you tell this story twenty-seven times?”

Mr. Stimpson attributes the perpetuation of chestnut in this sense to the English-born American actor William Warren, who had played the part of Pablo, at a stage dinner where he repeated Pablo’s concluding line after hearing an old joke.

But as this William Warren died in 1832, whereas chestnut only came into popular use about fifty years later, it is more likely to have been his son, William Warren, Jr., also a player of comedies, who died in 1888, who repeated Pablo’s line.