An exemplary use of this trope is in Thomas Bangs Thorpe's The Big Bear of Arkansas. The eponymous character seems to follow the archetype of the romanticized American frontiersman, engaged in an epic struggle against nature. The narrator of the story sits in rapt attention while "Big Bear" regales him with the tale of his pursuit of a legendary giant bear; the story meanders pointlessly for a while, and ultimately Big Bear fails to kill the bear before it dies of shock. Why did it die of shock? Because it entered Big Bear's property while Big Bear was taking a shit, and died at the sight of it. That's right, the whole point of the story was to get the reader to listen to a twenty minute story about the narrator voiding his bowels. It gets better - the entire story of his "chasing the big brown bear" may have been nothing more than an extended metaphor for Big Bear's attempting to move a particularly bulky "load." Big Bear of Arkansas is effectively nothing more than a prank against the credulity of New Englanders who over-romanticized life on the frontier.
Finnegan's Wake, if it even has a plot, is this. Due to possibly being All Just a Dream, the "story" winds through its almost incomprehensible brogue only to begin on a sentence fragment and end on the other half of the same fragment. If anything at all was accomplished, it was probably the dreamer waking up and thus the book ending where it did.
Lawrence Sterne's The Life And Opinions Of Tristram Shandy is probably literature's most famous example of this - the gist is that the book contains precious little of his life (it starts years before the narrator's birth and only ever gets to the stage that Shandy is around 6 months old before heading off back into the period before his birth again) and none of his opinions (his family get plenty of room to air theirs though). It's also very funny.
In the final book of His Dark Materials trilogy it is revealed that The Authority (AKA God) is so old and fragile it takes only a light breeze to destroy him.
Also, a number of plot points and much buildup from the first two books is casually tossed aside in favor of a tear-jerker endingenforced by destiny, despite all that talk about it being Lyra's job to overthrow destiny in the first book. The third Shaggy Dog of the books is then tied to the second, since after all the character buildup and romantic subtext, the two main characters are each put on a separate bus, never to see each other again, and with no sufficient reason why they feel the need to go along with this, so the third book of the series is a shaggy dog to the third power.
The Pledge, by Friedrich Dürrenmatt: A detective is obsessed with catching a serial killer of children. He sets what he thinks is an infallible trap... The killer never shows up. Years later, after the detective has ruined his life out of despair, it turns out that the killer was in a car crash on the way to the rendezvous.
Guy De Maupassant's 1884 short story "The Necklace". A young, lower middle class couple borrows some nice clothes and jewelry from an upper class friend to wear to a party. During the course of the party, the lady loses a nice necklace. Hiding the truth, the two buy a duplicate of the necklace, are forced to sell their house and all their possessions and basically work as slaves for the next twenty years to pay back all the loans, only to be told at the end it was only costume jewelry, and worth only a couple of dollars at the most, resulting in a horrifyingly despicable Know Your Place Aesop that almost borders on Shoot the Shaggy Dog.
Readers today can also see the Aesop as "Honesty is the Best Policy". If the borrower had simply told the truth at the beginning, they would have avoided all their problems.
An alternate Aesop overlaps with Character Development - the woman in question was bitchy, and used money that her husband would have used to go on a holiday to buy a dress for herself for the party (she didn't borrow it, just the necklace), and borrowed the necklace because she couldn't stand the thought of people seeing her in anything less than stunning attire — all her self-worth came from her appearance and what people thought of her. After having to move down a couple social classes to pay back their debts, she learns to sympathise with others, to value herself for who she is, not what she looks like, and becomes a much nicer person as a result. An alternate Aesop could easily be that hard work builds character and looks aren't everything.
A particularly Downer Ending version is found in the Warhammer 40,000: Gaunt's Ghosts book Necropolis. The Ghosts, Vervunhive Primaries, Bluebloods, North Cols, and scratch companies all endure horrendous losses in the ultimately (if just, just barely) successful defense of Vervunhive... and at the end, Vervunhive is abandoned, as the city has been damaged virtually beyond repair and no survivor wants to return. Still, at least the Ghosts got some new blood in the end, as many of the Vervun defenders were impressed by the Ghost's heroism and elected to join them after the battle ended.
Also, the Chaos troops would probably have moved on to attack other hive cities had they succeeded in destroying Vervunhive.
In the Dragon Age: OriginsPrequel novel, Rowan is in love with Maric, who she's been politically arranged to marry. Turns out that Maric doesn't love her that way and falls in love with an elven woman, Katriel. Rowan is understandably upset by this turn of events but it gets worse. She gets over Maric and falls in love with his best friend, Loghain instead. However, near the end of the book, Maric kills Katriel for being an enemy spy and Rowan finds herself going along with the original betrothal agreement and ultimately marries Maric out of duty and not out of love. What was the entire point of that?
The short story "God's Hooks" by Howard Waldrop, in the spirit of all stories about catching improbably large fish, ends with the fish not being caught, making the whole story pointless. (Assuming you think that whether the fish gets caught is the point.)
American Psycho by Bret Easton Ellis (and the film adaptation) - Patrick Bateman becomes increasingly insane and homicidal and a lot of people die at his hands, culminating in him confessing to his lawyer... but in the end, no one believes him, and the book and film end as they begin, with him making boring small talk with boring, self-absorbed people. Patrick himself says at one point: "There has been no reason for me to tell you any of this. This confession has meant nothing..."
The Andromeda Strain; the entire book is spent trying to find a cure for said strain, only to reveal at the end that it had already mutated into a non-infectious form. Because of breathing quickly (but that's another matter entirely) Granted, it's still dangerous, but...
My Sister's Keeper by Jodi Picoult: Anna was conceived to be a donor match for her sister Kate, who has had aggressive leukemia since she was 2. When her parents ask Anna to donate a kidney when Kate's kidneys fail, she sues them for medical emancipation. It is successful and she gains medical emancipation, only to be in a car accident on the way back from court one day with her lawyer. Anna is brain dead, so they pull the plug and give Kate her kidney anyway, thus rendering Anna's court case useless.
Made even worse in the movie adaptation in that Kate asked Anna to take her parents to court so they would let her die. Jodi Picoult writes this a lot.
The Old Man and the Sea by Ernest Hemingway: Santiago spends the better part of the book fighting one fish as a classic stoic Hemingway Hero. In the end, he does manage to catch the fish, but it is simply eaten by sharks. To add insult to injury, a white resort guest simply mistakes the greatest fish he ever caught for the skeleton of a shark washed up on the shore.
In the Geronimo Stilton book, Geronimo Stilton, Secret Agent, Geronimo has to chase after the deed to The Rodent's Gazette, which was carried off by a very strong wind. Over the course of his search, he ends up going through the wharf, the dump, the sewers, and even his archrival's office, and only succeeds in nabbing the deed with help from his Secret AgentChildhood Friend. He gets the deed back to his grandfather's office by the exact deadline, only to find out the whole thing was just a test set up by his grandfather, who had the real deed in his office the whole time.
One of the (many) criticisms against the Magic: The Gathering novel The Quest for Karn is that it comes off as an unintentional example of this. "Karn is the only hope of saving our world from the invading Phyrexians! We have to find him! Yay, we spent a whole book finding Karn and we saved him! Only the Phyrexians won anyway. Huh."
A previous Magic: The Gathering novel, The Darksteel Eye (Which takes place on the world Karn created, incidentally) revolved around the search for three artifacts which will summon the Kaldra Champion who is expected to win the day for the good guys... Aside from never ever explaining what the Kaldra Champion is or where he came from, the Champion is turned evil very soon after being summoned by the bad guy Memnarch and very shortly after that is destroyed by the ascent of the green sun.
In Michael Crichton's Sphere, the main characters are investigating a most-likely alien ship that landed on the bottom of the ocean. Inside they find a perfect sphere with strange markings on them, and after they've entered the Sphere, they can do stuff with the power of their minds! Which results in the underwater research facility being attacked by among other things, a giant squid. All but three of them die and at the end they figure out what's happening. When they are finally rescued, they decide that the power to do anything with just your thoughts is too dangerous, so they decide to forget everything that's happened, explain the deaths of everyone by a leak or something and just by thinking this, it becomes reality. So basically, everything that happened in the entire book has become irrelevant in the last paragraph or so.
Not really. It ends on a subtle hint that implies that at least one of the characters didn't actually give up the power after all.
The War of the Spider Queen is a series of six novels set in the Forgotten Realms world. The plot revolves around a small group of elite warriors, priests, and wizards who are sent to investigate the sudden and total disappearance of the chief dark elf goddess Lolth. After traveling the world for months and visiting no less then three hellish dimensions, they have finally located her whereabouts. But as they approach the demonic temple in the Abyss, where her physical form is located it turns out that she was just undergoing a metamorphosis, from which she awakens all by herself only minutes before the protagonists reach her. Without anything that happened on the last two thousand pages having anything to do with it. After they've returned home, even the leader of the group is completely frustrated about the fact, that all she did was for nothing.
Splinter of the Mind's Eye. The Kaiburr Crystal, which amplifies a Force-Sensitive's power many times over, was sought by Luke, Leia, and Vader. And it worked all right. But it also lost power the farther it was from a specific site on the planet, and was almost completely useless offworld, just making a lightsaber marginally more effective. All that fuss and Brother-Sister Incest vibes for nothing.
Jedi Apprentice: The Fight for Truth: The Benevolent Guides of Kegan have prophetic visions. They become Well Intentioned Extremists to try and prevent the worst ones from coming to pass - implementing constant surveillance, cutting the planet off from the rest of the galaxy so that diseases easily curable elsewhere run rampant on Kegan, assigning people to careers without determining what they would prefer, not letting the people vote on anything the Guides haven't set up, not allowing pets, creating mandatory boarding schools in which children can't contact home, are fed propaganda and terrible food, and aren't allowed to make close friends, putting children who stand out in some way - having chronic illnesses, keeping pets, asking too many questions, being Force-Sensitive - in solitary confinement, and erasing the records of said children. A couple, worried that their baby daughter O-Lana will be taken away, manage to send word to the Jedi Temple that they think she may be Force-Sensitive, and a few Jedi are able to visit the world. There they promptly discover the ugly truths and despite the protests of the Guides they expose said truths. The people rise up, change things, reestablish contact with the rest of the galaxy. O-Lana's parents give her to the Jedi to be trained. Happy ending, right?
Here's what makes it a shaggy dog story, if not worse. O-Lana becomes a promising young Jedi Knight... who is killed by Darth Vader cleansing the Jedi Temple. The visions the Guides had were of masked soldiers - stormtroopers - bringing ruin and despair to Kegan, but they also had even worse visions of some kind of device that caused the entire planet to be destroyed - Death Star testing? One of the other superweapons? Maybe if they'd stayed isolationist they would have been ignored, they were very obscure and backwater, but O-Lana had some measure of fame, and through her world was known.
Just in general a lot of Clone Wars-era books of the Star Wars Expanded Universe are this trope, because of Order Sixty-Six and Anakin/Vader and the clone troopers turning against the Jedi, and the corrupt Republic that at least tries to be fair becoming the far more oppressive Empire. The majority of the Jedi who strive so hard and survive in those books will be betrayed by those they trusted.
The tragedy of Daisy Miller ultimately (intentionally) comes from this trope. Winterbourne realizes he misjudged Daisy and should have trusted his own opinion of her rather than everyone else's after she dies. There is nothing left for him to do but return to Geneva and continue to live just as he was at the beginning of the story.
Neil Gaiman's novella collaboration with Yoshitaka Amano, The Sandman: The Dream Hunters, concerns a tale where a monk is cursed by a onmyoji to die from an entrapping dream, so that the onmyoji can find peace with himself. A fox, who had earlier fallen in love with the monk after trying to trick him, attempts to save the monk. In the end, the fox, with the help of Dream of the Endless (or as he is referred to in the novella, the King of Dreams), usurps the monk's dream so that he may live. However, the monk travels to the realm of dreams so that he may claim his own dream and save the fox. By sacrificing himself, the monk rendered the fox's quest in vain, much to the chagrin of the fox.
With the exception of one chapter entirely about how two natural enemies in the party become best friends. The ending, in which the crew was apparently transformed by witnessing the Baker's heroic efforts, might have gone somewhere if it hadn't ended at that exact point... which is very clearly why it ''did'.
Older Than Dirt: The Epic of Gilgamesh is not only one of the oldest written stories still in existence, but also an ancient Shaggy Dog Story, in which we learn about this epic (if often cruel by modern standards) hero, who slays monsters, challenges gods, dares seek immortality... then fails in his quest due to sloppy packing, and dies of old age.
Neil Gaiman's American Gods concludes, after countless chapters of the protagonist not really doing anything proactive towards the main plot, with a minor side character being literally told, in person, by the three fates, how to stop The Chessmaster. Then, she does it. Unsurprisingly, it works. Our hero, thus freed from the cumbersome narrative demands of the Big Bad, goes on to face a trivial side villain who apparently wants to die anyway, watches as no fewer than four potential love interest characters head off their separate ways, and... that's it. The book ends on neither a bang nor a whimper, but a note so soft, you could swear it was waiting for a moment to unleash all the epicness inherent in its premise to this day... but it's not.
There has been at least one short story published since then, which features Shadow taking a much more proactive role in his life in general, so there's that.
Isaac Asimov wrote a short story about an idealized future floating city, ruled by an emperor-like leader, that in the end is brought down under the weight of a bunch of military spaceships - all in service of setting up the last line of the story, which is a fairly bad pun. The title of the story? "Shah Guido G." As Asimov himself admitted in commentary, it's all there in the title. (If you don't see it, split the title between the "i" and the "d." Now read.)
Oddly enough, despite the lampshade it isn't actually all that good an example - sure, the entire point of the story was to set up a bad pun, but as the other character in the framing story points out, the narrator did bring down the floating city (it just happened to be by manipulation), and that led to a better, more vibrant society being established. In other words, the struggle of the story is not unexpectedly rendered moot when it ends.
In the Callahans Crosstime Saloon series by Spider Robinson shaggy dog stories and puns are the common thread through the entire series. Most shaggy dog stories in the series are elaborate build-up to a mindnumbingly horrendous pun to the delight of the crowd (once the BSOD wears off).
While Catch-22 itself is not a Shaggy Dog Story, it's made of them. For example, the protagonist Yossarian is a bombardier in WWII. He asks his friend Doc Daneeka to ground him. Yossarian has flown dozens of combat missions and is due to be replaced, but his Pointy-Haired Boss of a commander insists on sending his men into greater danger and more missions than any other bomb group. Yossarian asks on the grounds that he's crazy. Doc Daneeka points out that anyone who is crazy must be grounded. Of course, they have to ask to be grounded in order to be grounded. Asking to be grounded in the face of danger is a sign of sanity. Anyone asking to be grounded must therefore be sane, which means they ''cannot'' be grounded. Doc Daneeka informs Yossarian of all this and sends him back up to fly. This is where we get the colloquial expression Catch 22 for a situation where the rules of an organization result in damned-if-you-do, damned-if-you-don't. The book is full of similar scenes. It works as a rich source of Black Comedy and as a means of delivering the book's Aesop.
Otherland, by Tad Williams, has a layered use of this trope. One of the main protagonists, !Xabbu, is an African Bushman (San for the overly pedantic) who is close to, if not the Last of His Kind, and relates many of his tribe's stories to the other characters throughout the novels. These stories lack the narrative structure one would expect of Western literature and frequently have endings that are only tangentially related to their beginnings. Loop back to the main plot: the Other, the quasi-sentient operating system of the eponymous network, which the protagonists are trapped inside of, also appears to have developed a warped sense of narrative causality and keeps trying to steer them into its vision of how its "story" should play out, which is disturbingly random at times. The final blow comes when, after the protagonists have solved the Win to Exit plot, it's discovered that the Other's deepest secret is completely unrelated to any part of the plot which has been revealed to this point, and the resolution of that secret threatens to render everything else that's happened in the story irrelevant. This is discussed extensively by the characters.
In True Grit and the 2010 movie based on it, Mattie goes to great effort to see Rooster Cogburn for the first time 25 years after he saved her life and vanished into the night. Would have been a touching reunion if he hadn't died three days before.
Kevin J. Anderson's Darksaber. At least, the part about the eponymous superweapon. To make a long story short: the Big Bad built it using shoddy labor and substandard material, and the first time he tried to use it, Rocks Fall, Everyone Dies (literally, in this case). All the good guys had to do was show up, and their contribution to the finale was complete.
Niel Hancock's Circle of Light series. Much of the plot revolves around the heroes' efforts to keep the Arkenchest out of the hands of the Big Bad. At the end, when she finally gets it and all hope seems lost, the Arkenchest's sheer goodness transforms her into an angel of light. They could have ended the conflict faster by just giving it to her.
In The Restaurant at the End of the Universe, Ford Prefect, three Pan-Galactic Gargleblasters into drinking himself senseless, tries to explain how the universe was made in the first place (which is essential to understanding how it ends). He gets Arthur to picture a film of a black ebony conical bathtub draining of sugar (or fine sand) threaded through a projector backwards so it looks as though the sand is spiraling into the bathtub from the bottom.
Arthur: And that's how the Universe began, is it? Ford: No, but it's a marvelous way to relax.
In The Wise Man's Fear, Kvothe introduces the mercenaries he's traveling with to this trope, with a story of a child born with a golden screw for a belly button, who goes in search of why he was born that way. It takes an entire page to tell, and the end of the story is that he finds the screwdriver that fits the screw, and when it's unscrewed, his rear end falls off. As none of his companions have ever heard a shaggy dog story before, their reactions are... amusing.
The Patchwork Girl of Oz is all about Ojo's quest to gather the ingredients needed to cure his uncle of a curse. He fails, because one of the ingredients is under the protection of the Tin Woodsman, who won't give it up since it requires a living thing to be harmed. But Glinda the Good can do magic, so she can totally just cure Unc Nunkie anyway, and a lot of trouble could have been saved by going straight to Quadling Country for a visit.
To make it even worse, the quest for the ingredients was endorsed by both Dorothy and Ozma, who the characters met about halfway through the story. The two characters know both the Tin Woodsman and Glinda well, yet the fact that Glinda can do magic and the Tin Man is a Actual Pacifist apparently do not occur to them, or at least are not worth mentioning.
In Animorphs Book #28, "The Experiment", the group spends most of the time investigating the Yeerks' efforts to make a drug that will eliminate free will. As it turns out, the drug doesn't work, and the results were falsified in order to delay the wrath of Visser Three. However, it is subverted at the end, when Cassie points out that they still saved people and animals from being subjected to Yeerk experiments
Another example is in Book #14, where the Animorphs and the Yeerks investigate Zone 91 to find evidence of alien technology. It turns out to be an obsolete Andalite toilet. However, this is another subversion, because it's still an alien toilet, and the Yeerks will want to make controllers out of people there to investigate what it is (they don't know what it is).
David Foster Wallace's Infinite Jest is one of these in its entirety. The narrative is famously long, and doesn't appear to be going much of anywhere until the last third, when the action finally picks up. Then the last hundred pages or so are occupied with a description of one of the protagonists having a fever dream. The closest thing to resolution occurs in a throwaway flashback in the book's first chapter. Some readers think this is brilliant, others hate it.
The Children of Húrin has shades of this. Túrin spends the whole book trying to fight against his curse and even kills the dragon Glaurung who has been destroying his life, only to find out that his wife is actually his sister and both kill themselves. The shagginess is only compounded in The History of Middle-earth material The Wanderings of Húrin where Túrin's father, having been forced to watch the curse destroy his children's lives, tries to avenge them and his wife's deaths... only for him to ultimately make things worse and is basically told that he isn't helping anyone. Then he kills himself.
Robert Anton Wilson's Schroedinger's Cat Trilogy ends with the revelation that the three volumes were just the set-up for a single dick joke.
In the Spellsinger novel The Day Of The Dissonance, Jon-Tom travels hundreds of dangerous miles to fetch medicine for the ailing wizard Clothahump. Not only does it turn out that the "life-saving" medication is just ordinary aspirin, but Jon-Tom already had several identical tablets in the pocket of the jeans he was wearing when he arrived in Clothahump's world.
R. J. Rummel's Reset — Never Again is Exactly What It Says on the Tin. The entire book could have been excised from the series and it would not have affected the overreaching plot at all.
The first chapter of Wayside School is Falling Down has Louis carry a heavy and fragile package from the first floor of Wayside School, to Mrs. Jewls' classroom, located on floor 30. After he climbs 30 flights of stairs and reaches her door, he has to hold it up for several more minutes, while the kids decide who should open the door. After Louis finally brings the package inside the room, Mrs. Jewls unpacks a computer from inside it, and proclaims that the computer will help her students learn new things more quickly. She then demonstrates the concept of gravity by dropping the computer out the window and letting the kids see how quickly it can fall to the ground and smash.
In Chuunibyou Demo Koi ga Shitai!, Yuuta spends most of the first novel going through a lot just to help Rikka review for her remedial exam in Mathematics, only for her to fail spectacularly at the end of the book. By the start of the second novel, Rikka still hasn't gotten any better, with her highest exam score a pathetic 30 out of a hundred.
The Agatha Christie novel A Pocketful of Rye. Miss Marple learns that a maid who used to work for her was murdered as part of a scheme that also included the poisoning of a Corrupt Corporate Executive. Miss Marple goes to investigate. She eventually figures out that the maid was the one who put the poison in the Executive's breakfast, acting under the orders of her boyfriend who had told her that the poison was actually a truth drug. The entire thing is rendered pointless by the last chapter: Miss Marple returns home to find that the maid had sent her a letter confessing the entire plot. It was nice to get some confirmation that Miss Marple's theory was right, but it also means that the story would have had exactly the same outcome if Miss Marple had just stayed home and checked her mail.
Most of the Tide Lords tetralogy is about the political conflicts between two kingdoms, which get complicated by each country being taken over by a faction of immortals who wish to rule the world. The whole matter becomes moot when in the fourth book a third faction blows up the entire planet, killing everyone other than a handful of the immortals.
While it doesn't seem so if you read the book as a standalone, to anyone familiar with The Riftwar Cycle, the novel Murder In Lamut is one. This is due to the fact that the murder is largely irrelevant to the plot, and in fact happens roughly three quarters of the way through the story. The actual plot of the story is about three mercenaries trying to survive the various intrigues of a group of Barons who have realized that since their Earl is engaged to the only child of their elderly Duke, he's going to be the next Duke, which means that he'll have to appoint a new Earl (Presumably one of them). Unfortunately, anyone who has read the first novel in the series, which was published thirty years prior, already knows who the next Earl of Lamut is going to be - somebody who isn't in the book, and who none of the squabbling Barons have ever heard of or knowingly met.
Several of Oscar Wilde's short stories amount to shaggy dog stories.
In "The Star-Child", the title character is a foundling who is adopted by a poor woodcutter, and grows up beautiful but vain, cruel, and arrogant, convinced he is the son of a king and queen. When a beggar woman shows up claiming to be his mother, he rejects her and is turned into a hideous cross between a frog and a snake. He becomes an outcast and frantically tries to find his mother again. Eventually he is sold into slavery, and on three successive days his master tasks him with finding a piece of gold in a forest. Each time he fails in his quest until a rabbit (whom he springs from a trap on the first day) leads him to the gold, and each time he encounters a beggar on his return to the city whom he decides needs the gold more than he does. On the third day, he is told he will be killed if he fails in his task, and once again he gives the gold to the beggar instead of his master, but upon his return, his looks are restored and he is acclaimed as the heir to the throne of the unnamed country in which the story is set, and is not only re-united with his mother (who is both the beggar woman he rejected and the nation's queen) but discovers that the beggar to whom he gave the gold is his father (and the nation's king). His reign as king is described as a happy one... but he dies after just three years, and is succeeded by a sadistic tyrant.
In "The Nightingale and the Rose", a university student has been told by a professor's daughter that she will accompany him to a dance if he brings her a red rose, but there are none in his garden. A nightingale overhears the student lamenting his misfortune, but when she asks a rose tree for a flower, the rose tree replies that the flower must be built out of music by moonlight, and stained with the nightingale's lifeblood. The nightingale decides her sacrifice will be worth it if it ensures the student's happiness, and spends the night singing of love while pressed against a thorn on the rose tree, and by the next morning, the nightingale has died but a bright red rose has blossomed from the tree. Though unaware of the nightingale's sacrifice, or even of her interest in his plight, the delighted student picks the rose and hurries to give it to the professor's daughter... only to be told it doesn't go with her dress, and she is already going to the dance with the Chamberlain's nephew after he gave her a gift of jewels. The dejected student swears off love and goes back to his books.
"The Remarkable Rocket" features the title firework, the planned centrepiece of a display in honour of a royal wedding. However, while boasting to the other fireworks about how much greater he is than they are, he proves his "sensitivity" by bursting into tears, so that his fuse is soaked and he doesn't go off as planned. The next day he is thrown into a muddy ditch by the disappointed palace staff, and after several encounters with unimpressed forest animals, he is found by two boys, who mistake him for a piece of firewood. He stays on the fire for long enough for his fuse to dry out, and he finally soars high into the air and explodes in a magnificent shower of gold... before an audience of precisely zero (even the two boys have fallen asleep by the time he goes off).
Stephen Crane's short story "A Mystery of Heroism." A Confederate soldier has to retrieve water for his comrades, but the well is in the middle of the battlefield. After risking his life to reach the well, fill a bucket of water, and make it back, the bucket gets accidentally dropped on the ground, rendering his heroic act completely pointless.
The subplot about Nug-Shohab the Headless in That Is All. It comes to Earth on a meteorite as one of the many, many factors integral to The End of the World as We Know It and begins crawling to the south pole in search of its severed head. Along the way, it begins to have a change of heart after realizing the torment it's causing. Just as it is reunited with its head, Nug-Shohab fully realizes the value of human life and decides not to end the world. But then the Earth cracks in half anyway because of one of the other apocalyptic signs (specifically, the magnetic mountain at the north pole burrowing through the Earth's core, and Nug-Shohab's journey comes to nothing.
The second and third story arcs in Glen Cook's Black Company series turn out to be a serious version of this trope. After the Company is reduced to a handful of men, the new Captain decides to return to Khatovar, the Company's original homeland when it was founded 400 years ago, kicking off the second arc. The third arc has Croaker realize that Khatovar is another world, linked to his own through an ancient artifact called the Plain of Glittering Stone. The final book reveals Khatovar isn't a world, it's a city in that world, and it was razed generations ago by the cabal of sorcerers that now rules that world.
In Greg Egan's short story "The Planck Dive", the heroes' objective is to discover more about the structure of black holes, and possibly get some cool applications from them. In order to do so, they create clones of themselves to go into the black hole without actually putting themselves in any danger, though the hope is that their clones can somehow contact them so they can receive the data. It should come as no surprise, however, that once the clones pass the event horizon, they are unable to make any contact with their originals, rendering the experiment pointless and a waste of human life besides. Though considering how soul-crushing their discovery actually is, the clones don't really mind being unable to share it with anyone.