Pride of Baghdadends with all four protagonists being gunned down by American soldiers without even achieving the freedom that they'd been dreaming of.
Shade, the Changing Man ends with him rewriting history so that none of the events of the comic ever happened, leaving one character (who had gone back in time with him) missing, his son trapped permanently in a female body and he himself unable to reconnect with his lost love. There is a slightly upbeat moment in the last panel, but if you think about it, it's unlikely to have worked out the way he wanted it to...
The Karate Kid and Triplicate Girl plot thread from Countdown to Final Crisis. Two members of the Legion of Super-Heroes are dumped in the 21st century for reasons unknown to them, and Karate Kid turns out to be infected with a virus that could wipe out all life on Earth. After spending months trying to find a cure and eventually teaming up with the rest of the cast, they end up in an alternate universe, and Karate Kid dies, the virus spreads and turns humans into animalistic humanoids, and Triplicate Girl is torn to pieces by a pack of said animalistic humanoids. All to set up a universe similar to that of Jack Kirby's Kamandi character.
And you wanna know what's the real shit-kicker? That universe was going to be destroyed anyway in Final Crisis. Its remnants were fused together with those from other worlds and Comicbook Limbo so the original Kamandi-verse was recreated anyway (i.e. OMAC, Kamandi and the Post-Final Crisis original New Gods). Yes, Karate Kid and Triplicate Girl literally died for absolutely nothing. Oh Countdown, is there nothing you didn't destroy?
However, it was revealed in the Final Crisis tie in Legion Of Three Worlds that Triplicate Girl in Countdown was one of her duplicates as she has gained the ability to create vast numbers of duplicate bodies, and now goes by the name "Duplicate Damsel". She also reveals that one who died in Countdown was the second and last of her original duplicates.
Mr Hero: The Newmatic Man, an obscure comic published with Neil Gaiman's name prominently over the title (but with little actual involvement from him) ended up being this sort of a story when the entire year and a half run of the series ended up being nothing more than a successful Evil Plan by the Big Bad to retrieve and destroy the titular renegade steampunk soldier. A planned second volume may have changed things, but the imprint's failure made this the end of the story.
Freedom Ring was introduced in a different shaggy dog story about a young man finding a powerful ring, using it to become a super hero...and getting beaten into a pulp. Soon he uses the ring to heal himself, make himself stronger, and trains to be a better super hero...only to be killed by the next real villain he faces. Word of God was that the story was meant to be a Deconstruction of Teen Hero origin stories where the protagonist gets powers and learns how to use them without any sort of setbacks.
In Watchmen, the protagonists spend the entire story uncovering the conspiracy behind the Comedian's death. When they find out who did it, it is already too late to stop it. They all agree to never tell the public about what went on (except Rorschach, who is killed to maintain silence), making their journey pointless.
This also applies to Tales of the Black Freighter, a story within a story that's featured in a comic read by the kid that always sits by the newstand. In it, a man escapes from the titular ship and races across the sea to beat the ship to his home island, where he knows its crew will murder his family. He does many gruesome and evil things to do this, including making a raft of corpses and murdering an innocent woman. When he finally gets to his destination, he almost kills his wife by mistake anyway and, destroyed as a person, he goes back to Black Freighter, the only place left for him.
To make matters more pointless, there's the implication that Rorschach's tell-all journal will be published, which just might lead to World War III happening anyway...
Also, said kid, along with the guy who runs said newsstand, and the many other citizens of New York City we get acquainted with and sympathize with over the course of the story... they all die as a result of that conspiracy. All of them. (Well, except for the guys working on the New Frontiersman... but seeing as that's a far-right publication that runs racist, xenophobic, and hawkish content regularly, they aren't exactly the most sympathetic.)
Planet Hulk, granted it was pretty damn obvious that Hulk was going to be brought back to Earth by a storyline at some point, but to have a damaged warp-engine (placed by rebels as stated in World War Hulk though supposed ally Miek allowed them to do so) explode and effectively destroy everything he had spent a good portion of the novel building towards, a wife, future child, kingdom, peace and acceptance as a respected and admired being in the last few pages seems to fit this trope to a T.
The storyline alone is an example, but the overall comic ultimately subverts it, as Hulk's child Skaar survives the destruction and eventually comes to earth and affects the story. Then it turns out that Skaar has a twin brother, who also survived, and ends up causing another story.
Many of the stories in Will Eisner's Contract with God trilogy are of this type.
The graphic novel House is about as pure an example of this as you're going to find, particularly in regard to the "shaggy dog" part. Three people explore an abandoned house. All three of them get lost and die. The end. We never find out anything about them other than that two are in love, or anything about the house other than that it's Bigger on the Inside, and the deaths of the protagonists are ultimately arbitrary, independent of their own mistakes or failures.
Countdown to Infinite Crisis. Somebody wants Blue Beetle Ted Kord dead. He asks everybody he knows for help, and they all turn him down, often in the most insulting manner they can manage. In the end, he tracks the culprits down, discovers their secrets, discovers a plan to kill all his friends, and then promptly dies. After having accomplished nothing. Basically, the story is that Blue Beetle lived, he sucked, and he died. The end.
This happens sometimes in Chick Tracts. In "Fatal Decision," in which the doctor sells all his stocks and bonds to afford a vaccine for a patient, loses his son in an auto accident on the way there, and arrives to give it to the patient. The patient destroys the vaccine because a disgruntled orderly manipulated him into distrusting the doctor, resulting in him dying a few days later. In case you can't tell, the doctor is God, his son is Jesus, the vaccine is salvation, the orderly is Satan, and the patient is those who reject God's salvation.
Transformers: Wings of Honor: Metalhawk, Dion, Magnum, and Onslaught all are in the Elite Guard and they strive to stop the growing Decepticon threat lead by Deathsaurus. They take several victories, but in the end, Onslaught falls to the dark side and kills Metalhawk along with much of the supporting cast. Dion and Magnum rally the survivors to fight Deathsaurus and defeat him, driving him back. Then Megatron comes, defeats and exiles Deathsaurus, imprisons Onslaught, and kills either Dion or Magnum. Optimus Prime takes up leadership of the heroes, and the war progresses for millions of years. All the victories and defeats of the Decepticon faction and the Elite Guard are completely meaningless as the war proceeds almost as if they weren't there.
It gets worse within the context of the rest of the Starman series. Mist II, having carried out a perfect plan where she kills 3 superheroes and get away with it goes on to do...um, nothing really. She reunites with her evil father, dutifully obeys his orders (which mostly involve standing by the sidelines during the Grand Finale), both Starman and her father deprecate her entire criminal career to her face, and finally her own father kills her to show off how evilhe is. The only relevance that earlier group slaughter of the JLE has comes when she tries to brag about it and Starman shuts her up...by calling her murder victims "easy targets".
Deadpool #250 is a particularly cruel example of this. The entire issue features Deadpool desperately trying to protect his friends and daughter after they've been targeted by the ULTIMATUM organization. He eventually manages to kill the terrorists, and afterwards, decides to retire from his life of violence to be with his child. Just as Deadpool and the others begin to celebrate his new beginning, the entire planet is destroyed during a collision with the Ultimate Marvel Earth, kick-starting the events of Secret Wars.
The long-forgotten mini-series Conspiracy revolved around a journalist from the Daily Bugle stumbling upon a shadowy cadre of figures who have seemingly been manipulating the Marvel Universe since the dawn of the Silver Age. The story ends with said journalist preparing to go to the late Bolivar Trask's mansion to find some evidence that will presumably expose the conspiracy, only for an unseen figure to show up in his hotel room. The final page heavily implies that the journalist was killed and that his research was either confiscated or destroyed, meaning that all his investigating was for nothing.
Captain America (vol. 5) #7 is a Day in the Limelight issue focused on Jack Monroe, Cap's former partner. After having a psychotic relapse, Jack dons his Nomad costume and sets out to rid the world of a powerful drug dealer who is selling their product to children. He has no luck finding the dealer, and is eventually shot and killed by the Winter Soldier. The final page then reveals that it was all for nothing anyway, as the "dealer" was actually an ice cream salesman who was jokingly bragging about getting kids "addicted" to his treats.
The main plot of All-New Wolverine's first arc finds X-23 attempting to save the lives of her clone sisters, who are slowly being killed by nanomachines bodies that take away their ability to feel pain. Things take a turn for the worse for Zelda, the eldest clone, in issue 4, and she has only hours at best left to live. In issue 5, Laura borrows an Ant-Man suit, and she and The Wasp shrink themselves down and enter Zelda's bloodstream to fight the machines off. They succeed, and Zelda regains consciousness. At that precise moment, Captain Mooney — who has spent the rest of the series to this point tracking them down, and manages to locate them after Laura and Jan's attack on the nanites trips a distress call — arrives, and Zelda is mortally wounded protecting the rest of her sisters. So despite Laura and Jan's efforts, she dies anyway.
Issue 11 of The Wicked + The Divine is this. Our protagonist Laura seems to have discovered who framed Luci for murder and on the way home meets Ananke where it is revealed she is actually the thrteenth god of the Pantheon, Persephone. Laura is elated and Ananke encourages her and then murders her from behind, followed by killing her parents and blowing up their house to preserve the secret that Laura is wrong about who framed Luci because Ananke did it.
Issue 13 as well, as it turns out Tara is a deeply depressed woman who was driven to suicide because of the massive amount of public hate she got and how the rest of the Pantheon treats her. What hammers it in is that Ananke destroys her suicide note informing the Pantheon of that fact, allowing them to think she was murdered instead.
Thor: World Engine by Warren Ellis has a major subplot about a British cop named Warren Curzon, who is trying to track down Thor. He finally catches up with Thor and the Enchantress in the final issue, only for the Enchantress to casually murder him for no reason.
Ruins, another Marvel Comics comic by Warren Ellis, has Philip Sheldon try to publish a book about the horrors he's witnessed in the world and the deaths he's heard about as well as his arguments that something's wrong with how things are in the world. He ends up succumbing to a mutant virus he caught from Peter Parker and falls to the ground dead as his notes and photographs scatter in the wind.
One old issue of MAD featured Al Jaffee's story, "The Meanign of Life". The protagonist was a dirty, smelly guy named Marvin, who was upset because he was a nobody. One day, he hears a voice, who suggests getting himself cleaned up. Marvin does, but he's still a nobody, a sweet-smelling nobody. The voice talks to him again, telling him he looks rotten and decrepit. So Marvin gets plastic surgery, a better hairstyle, and cleaner clothes, but he's still a nobody, a sweet-smelling, good-looking nobody. The voice speaks again, telling him he should try being more articulate in his speech. So he attends speech therapy classes, but is still a nobody, a sweet-smelling, good-looking, articulate nobody. The voice appears again, telling him to try being less crude and vulgar. So he takes music, theatre, and etiquite classes. Unfortunately, now he's a sweet-smelling, good-looking, articulate, cultured nobody.Finally, the voice tells him that the true reason he's a loser is because he's being selfish, and if he finds someone who is just as much a nobody as he is, he can find purpose and be somebody. Marvin searches the world up and down, and finally finds someone who seems just like he was at the start; he's happy for a minute... but then the guy shoots and kills him. The final panel shows the killer behind his own "Wanted!" Poster, which describes him, ("Arnold Acne", Public Enemy #1) as "Ugly, smelly, inarticulate, uncultured, selfish, and very dangerous."