In its original sense, a shaggy dog story or yarn is an extremely long-winded anecdote characterized by extensive narration of typically irrelevant incidents and terminated by an anticlimax or a pointless punchline.
Shaggy dog stories play upon the audience's preconceptions of joke-telling. The audience listens to the story with certain expectations, which are either simply not met or met in some entirely unexpected manner. A lengthy shaggy dog story derives its humour from the fact that the joke-teller held the attention of the listeners for a long time (such jokes can take five minutes or more to tell) for no reason at all, as the end resolution is essentially meaningless. The nature of their delivery is reflected in the English idiom , by way of analogy with the production of yarn.
The commonly believed archetype of the shaggy dog story is a story that concerns a dog. The story builds up, repeatedly emphasizing how shaggy the dog is. At the climax of the story, someone in the story reacts with, "That dog's not so shaggy." The expectations of the audience that have been built up by the presentation of the story, that the story will end with a punchline, are thus disappointed. Ted Cohen gives the following example of this story:
A boy owned a dog that was uncommonly shaggy. Many people remarked upon its considerable shagginess. When the boy learned that there are contests for shaggy dogs, he entered his dog. The dog won first prize for shagginess in both the local and the regional competitions. The boy entered the dog in ever-larger contests, until finally he entered it in the world championship for shaggy dogs. When the judges had inspected all of the competing dogs, they remarked about the boy's dog: "He's not that shaggy."
However, authorities disagree as to whether this particular story is the archetype after which the category is named. Eric Partridge, for example, provides a very different story, as do William and Mary Morris in The Morris Dictionary of Word and Phrase Origins.
According to Partridge and the Morrises, the archetypical shaggy dog story involves an advertisement placed in the Times announcing a search for a shaggy dog. In the Partridge story, an aristocratic family living in Park Lane is searching for a lost dog, and an American answers the advertisement with a shaggy dog that he has found and personally brought across the Atlantic, only to be received by the butler at the end of the story who takes one look at the dog and shuts the door in his face, saying, "But not so shaggy as that, sir!" In the Morris story, the advertiser is organizing a competition to find the shaggiest dog in the world, and after a lengthy exposition of the search for such a dog, a winner is presented to the aristocratic instigator of the competition, who says, "I don't think he's so shaggy."