Goodbye To All That: Extraordinary wartime physical hardship. Constant exposure to danger and death. An unbridgeable gap between the experience of those on the front line and those on the home front
Die Waffen nieder! (Lay Down Your Arms), which, until the publication of All Quiet on the Western Front, below, was the most important work of anti-war literature. Its author, Bertha von Suttner, went on to receive the Peace Nobel Prize in 1905, and is featured on the Austrian 2€ coin today.
Wilfred Owen's poems. The most famous example is probably Dulce et Decorum Est, which happens to be loaded with enough horror and powerful messages to completely convince someone that war is an awful thing.
The Forever War: We're fighting them because they are fighting us because we are fighting them because ... a war without any sensible objective that no-one can stop. Soldiers that return home find it utterly alien: who are they fighting for?
Time dilation only exacerbates this problem- the people the soldiers left behind at home are long dead, and that was a certainty going into the war.
Slaughterhouse-Five by Kurt Vonnegut: the WWII firebombing of Dresden haunts the book. You could see all of Vonnegut's work as an extended Creator Breakdown in the face of his hellish wartime experiences.
Post WWI, Septimus in Virginia Woolf's Mrs. Dalloway suffers from shell shock-induced hallucinations and might have full-blown schizophrenia. He also has survivor guilt over the fact he saw his friend Evans get blown up and believes Evans's ghost haunts him.
Three Day Road by Joseph Boyden: Native Canadian snipers in World War I. A fairly innocent young man snaps completely under the impact of the war and commits war atrocities. Graphic and nihilistic.
John Marsden's The Tomorrow Series features a group of teenagers who become guerrilla fighters when Australia is invaded by an unspecified foreign power.
Madeleine L'Engle's A Swiftly Tilting Planet features a shell shocked veteran of the Civil War, Union side. It takes him months to open up even to his twin brother, and he never gets over the experience fully. (Includes a more literal And I Must Scream than usual: "I saw a man with his face blown off and no mouth to scream with, and yet he screamed and screamed and could not die.") The entire book is spent averting a worldwide nuclear war, so this trope is kind of necessary.
The Flashman series tends to lean this way, which is unsurprising given the setting. Flashy lives through some of the most terrible campaigns of his era including the retreat from Kabul and the Sepoy Mutiny, and in most cases he only survives because he is a lucky, cowardly, lucky, conniving, lucky, bastard.
K.J Parker's The Scavenger Trilogy and his work explores war exhaustively in a Low Fantasy setting. It grubs up the base motives for war, the inglorious mess that a full-blown war becomes, the wreckage it makes of humans and human life.
Gone with the Wind has quite a bit of this trope, and the book really focuses on how difficult life was in the South for the civilians towards the end of the war.
Hemingway wrote often on this trope. A Farewell to Arms and For Whom the Bell Tolls brutally depict the horrors of war, the former set in the muddy trenches of WWI, and the latter depicting the unique barbarism that is found only in civil wars, in this case the Spanish Civil War.
Harry Turtledove's book A World of Difference: after American and Soviet spacecraft land in opposite Minervan (Martian) nations and the Medieval Minervans later go to war. Each with a human adviser, the Soviet with an AK-74 and the American with a pistol. Then an American ultralight drops a jumbo-sized Molotov cocktail on the Soviet causing the American-friendly King to shudder in terror at the thought of what human battlefields must be like with noise weapons everywhere and fire falling from the sky.
The Lord of the Rings doesn't go on and on about descriptions of wartime brutality (the gore, dismemberment, trauma, etc.) but at the end of the battle of Pelennor Fields, a battle everyone knew was morally okay to fight, there is a running list of good people who were cut down with little fanfare, and several who did get fanfare but were still dead and mourned. Further, there is Helms Deep, where Hama's body was "hewn even as he lay dead before the gates," and the fear for the lives of friends and loved ones when a small contingent was hemmed into the caverns by the Uruk-Hai the vast desolation of the landscape to fuel the war machines of Isengard and Mordor, and Samwise musing on the fact that most of the people killed in war, even on "the wrong side," probably aren't themselves evil at heart. Then after that, there is the scouring of the Shire, where Saruman, so twisted by the loss of the war, tries to simply maim as much as he can. There have even been essays written about the orcs and the Ringwraiths and how they relate to this. Tolkien was a veteran of World War One, the war most likely to inspire a tragic view of war, as shown in many examples on this page.
A Song of Ice and Fire. Every side has thousands of soldiers being maimed or massacred, and the soldiers that do survive in one piece spend most of the time when they're not actively fighting rampaging through the villages, stealing, murdering, and raping as they go. The nobility try to hold onto a War Is Glorious mindset at first, but lose it rapidly as they start to suffer consequences too, and it's gone entirely by the time the Tully family takes Jaime Lannister as a hostage.
Catch-22. War is inescapable and insane. You can be promoted without doing anything and you can be arrested for breaking curfew while letting a rapist go free because he is on furlough.
Monstrous Regiment is a surprisingly dark Discworld novel dealing with war. Topics include execution of prisoners of war, intentional friendly fire, rape and murder of civilians, corruption in the supply chains, starvation, field surgery, mental illness, etc.
Animorphs does this with teenagers fighting an Alien Invasion. You'd think something that was basically just Wake Up, Go to School, Save the World with animal powers would just be fun, but the series really rams this message in as the main characters lose their innocence, their sanity, their families, and in some cases, their lives. And that they might end up failing to get what they have fought for.
Romance of the Three Kingdoms while it had its epic war moments, was ultimately a tale of tragedy as three kingdoms vied for the control of China and ultimately none were victorious. In terms of the fates of the characters, Shu fell as Wide-Eyed Idealist Liu Bei soon became jaded, learning virtue is not enough to bring the people together. For Wu, the Sun dynasty's fall heralded a new tyrant who was so hated that the people did not resist and for Wei, Cao Pi realized that ambition worked both ways.
Patrick Ness' Chaos Walking trilogy seems to be going this way, although the theme seems to be more 'war can be a necessary evil' than 'war is always bad'.
Current themes explored in the series so far include slavery, and later genocide, a dictator and how he manipulates the population into not fighting against him (this includes full-out brainwashing), Grey and Grey Morality with the resistance overstepping the mark to achieve their end almost as much as the Dictator does, torture of prisoners, the nature of terrorism, religious fundamentalism, and discrimination resulting in dehumanization. There is also an Author Tract dropped against the idea that a real man is capable of murder. Yeah, it's a pretty heavy series. And all set within a small human colony in space, too.
Bolo - In the late days of Case/Operation Ragnarok, even the eponymous Knight in Shining Armor sapient supertanks are falling to bloodlust and slaughtering the enemy's civilians. When the sole survivor Shiva reawakens, he is horrified by the atrocities that he himself had not been above committing under the pretense of following orders.
This is brought up in The Book Thief, as a young German girl and her adopted family living in Germany during World War 2 and aren't living in the best conditions. What was particularly heartbreaking was when the street they were living in was accidentally bombed and everyone except the little girl died. It's quite harsh when you realize that it was the Allies who did that.
A subtle, but constant theme in the Honor Harrington series. Every battle will mention the human cost, and nearly Anyone Can Die. Weber has said, in an interview, that you need to do this if you're doing military fiction.
"Military fiction in which only bad people—-the ones the readers want to die—-die and the heroes don't suffer agonizing personal losses isn't military fiction: it's military pornography. Someone who write [sic] military fiction has a responsibility to show the human cost, particular [sic] because so few of his readers may have any personal experience with that cost.
Mockingjay, the third Hunger Games book, is very very antiwar. The book is mainly about the PTSD-stricken heroine being used as a pawn by both sides of a war between the rebels and the Capitol. And at the end, she finds out that President Coin, the leader of the resistance movement, hijacked a Capitol airship and bombed a group of children to make it look like the Capitol did it, purposefully sending in Katniss's little sister so that she would be slaughtered too, so as to emotionally damage Katniss since she had outlived her usefulness. In other words, the theme of the book is that no matter what there will be horrible people on either side of a war and innocents and pawns will always have to die in their crossfire.
Fate/Zero, Fate/stay night'sLight Novel prequel, shows just how brutal and unforgiving the fourth Holy Grail War was, with mass murder, deception, betrayal, and all the terrible things the Masters do just to get a chance to win the coveted Holy Grail.
Dale Brown tears strips out of Elites Are More Glamorous in his works. You may be a member of a top secret unit with the Bigger Stick, but the numbers will always be on the enemy's side. Plan for every contingency, do your best, and at best the enemy will still get licks in. At worst, friends and trusted comrades will die. Succeed and no one will know your name; fail and at best you die, at worst you are disavowed, thrown to the wolves of public opinion as a sacrifice by uncaring superiors. War is never pretty even from behind a drone control station.
The Captain Horatio Hornblower R.N. books do not make any attempts to conceal the awfulness of British Navy life in the Napoleonic Wars. What with the gory descriptions of battle, hideous injury, worse medical care, brutal discipline, and foul food and water (this last is not inconsequential), the lead at one point thinks that the prison volunteers on his crew would have done better to stay in jail.
The Vorkosigan Saga plays with this trope a lot. For a Military SF series, there's not a whole lot of actual warfare going on; instead there's tons of low-level skulduggery and spy versus spy shenanigans to prevent full-scale wars from breaking out. The very few times some real mayhem occurs, we always get to see the consequences.
This is one of the main themes in Andrey Livadny's The History of the Galaxy books, especially the books that take place during the First Galactic War, a 30-year bloodbath started when the dictator-ruled Earth Alliance destroys the Dabog colony as a lesson to the other Free Colonies, sparking The War Of Earthy Aggression that eventually resulted in the total defeat of Earth and the establishment of the Confederacy of Suns. Since the novels are focused on characters, we get to experience the full extent of the horrors of war, especially, as the author calls it, the "technogenic" war, in which rapid technological progress has resulted in more ways to wipe out your fellow man than one can count. The full extent can be seen in novels featuring Humongous Mecha fights (of the Real Robot kind). The novel Serv-batallion as it shows a group of teens from Earth being conscripted to fight a war they don't support and, essentially, sacrificed by their commanding officer in order to get a Colonial Wave Motion Gun. Other novels involve war vets trying to adjust to living in a post-war galaxy.
Almost any Starcraft novel where the main characters are soldiers will have this as one of its themes. The notable examples are Speed of Darkness (in which a forcibly-conscripted Confederate marine takes part in one of the first engagements with the Zerg) and Heaven's Devils, featuring Jim Raynor as a fresh Confederate recruit who bought into the War Is Glorious propaganda before finding out for himself that it's far from it. The latter case actually takes place before the game's storyline and features the war between the Confederacy of Man and the Kel-Morian Combine, with both governments being full of corruption and greed. There is plenty of both heroic and senseless deaths (such as one of the main characters' Love Interest being suddenly shot through the eye by a sniper).
In Larry Niven's Known Space stories, advances in weapons technology over the next thousand years makes combat so horrible that most people simply cannot bear it. The government intentionally keeps a "stable" of sociopaths and psychopaths (either natural or chemically induced) just to do the fighting, because performing an act of violence with a modern weapon is so horrible the very thought sickens the average citizen of earth to the point of catatonia.
Katherine Kerr's Deverry Cycle books are mostly set in a recurring cycle of bloodshed and violence. The events of 835-843 are especially stark in being this. The main timeline is nicer, but the peasantry still doesn't fare well when the Lords go to war.
The Tortall Universe's portrayals of war are never pleasant. Even the most justified wars, such as the ones fighting against the personification of chaos or overthrowing a highly corrupt government, are shown to be gory and brutal, killing far too many innocents.
Though less prominent, at least at first, still present in the Circle of Magic. For example, Briar comes back from Yanjing suffering from extreme PTSD from the war he fought through there. All the reader knows about it comes from horrible nightmares he experiences, but the upcomingBattle Mages promising to go through it in all its bloody terror.
The Dresden Files and Codex Alera books (both by Jim Butcher) employ this trope in Urban Fantasy and High Fantasy settings. While the combat provides many opportunities for the protagonists to do no end of ridiculouslyawesome things, neither do the books shy away from showing how much mental and physical damage conflict does both to the combatants and the civilians. While various candidates for Big Bad may use war for their own ambition, they never believe War Is Glorious (and anyone who does espouse that mindset is either seen as an idiot or is deliberately using it to manipulate others) and however cool the battles may be, the books do not for a moment suggest that the awesomeness outweighs the suffering and brutality.