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 the Ungrateful Bastard that is humanity. Yeah, Chick doesn't have a very high opinion of us.
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 durng 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.