One of the Phantom Stranger's possible origin stories is this. An angel in Heaven, the Stranger refused to pick a side in the war between God and Lucifer. As a result, he was cast out of Heaven and Hell once the war ended, cursed to walk the Earth as a stranger to everyone.
Mouse Guard takes the fable about bats, beasts and birds as history, and shows the long-term consequences: bats will go berserk if you imply they are untrustworthy. To be fair, the bats claim that they weren't neutral in the old war, but that they were rejected by both sides because of their appearance.
Not all of the Transformers on Cybertron joined the Autobots or the Decepticons. This rarely worked out well for them.
The neutral town of Yuss in the Stanix region of Cybertron was a frequent target for relieving the boredom of Decepticons stationed in the area.
During the evacuation of Altihex, twenty to thirty Neutrals took control of a building, arguing for both Autobots and Decepticons to end the war, renounce their allegiances, and unite. Skywarp took a moment to consider whether or not to take advantage of their idealism... then decided to slag them.
In the current IDW comics, NAILs (Non-Aligned Indigenous Life-forms) are Cybertronians who left the planet during the war, wishing to have nothing to do with it. They've recently returned to Cybertron now that the war is "over" and the planet is inhabitable again. While they haven't been slaughtered outright yet, they've already managed to annoy both the Autobots and the Decepticons who both have the ability to crush them all if they could. The later are more than willing to kill them when they get the opportunity.
Uatu the Watcher from the Marvel Universe usually averts the trope. When he maintains his Alien Non-Interference Clause he's generally fine. He's far more likely to come to harm, or run afoul of his people's laws, when he gets involved in Earth affairs. Or stands too close to the Red Hulk.
A Red Dwarf comic, "The Cantabellis Tales" had the Dwarfers discover an abandoned spaceship with an Apocalyptic Log in the form of a poem based on The Canterbury Tales. They learn that the pilgrims all discovered they were on pilgrimages for different gods and a multisided holy war broke out. The log ends like this:
Log: "Hoi, look at Chaucer! While we're busy fighting, He sits in the corner, bleeding writing! Come, man, and choose a side to stick with, Speak truly, Chaucer, which boot do you kick with?" Kryten: At which point the recording breaks off abruptly.
Zeus spends most of Immortals trying to keep his fellow gods from getting involved in a mortal war, going so far as to kill Ares for interfering. As a result, Hyperion succeeds in unleashing the god-killing Titans, something Zeus or any other god could have easily prevented.
In film version of The Two Towers, Treebeard initially doesn't want to take side in the Middle-Earth conflict since nobody actually cares for trees. That is, until Pippin and Merry show him quite clearly that if Saruman wins, the forests will be felled altogether.
One of the many origins Europeans gave to fairies was that they were neutral angels who refused to pick a side when the Devil revolted against God and Heaven. Rather than be turned into demons and get cast into Hell, they were left to their own devices on Earth without ever returning to Heaven since they were neither good nor evil. Whether this is actually a punishment from their point of view is debatable.
The Magic: The Gathering novel The Prodigal Sorcerer inverts the trope. A sorcerer from an order of true neutral sorcerers comes down from his mountain to bring a quick end to a long-running three-way war. While he succeeds in this, attempts to forge a permanent peace in the aftermath go very badly and the sorcerer is manipulated by outside forces into nearly letting a foreign army in to curbstomp everyone. Arguably all sides, and especially the mage, would have been much better off if he'd just stayed out of it.
In The Sneetches, Sylvester McMonkey McBean offers his services to both the star-bellied Sneetches and those without indiscriminately. He ends up averting the trope completely, walking off with all of the Sneetches's money and laughing about how silly they are. This probably also qualifies him for Magnificent Bastard status.
One of Aesop's Fables, The Bat, the Birds, and the Beasts, tells of a Bat who refused to take sides in a coming war between the Birds and the Beasts. The war is avoided at the last moment, but when the Bat tries to join in the revelry, both sides threaten to tear him apart. Probably the Ur Example of this trope.
"He that is neither one thing nor the other has no friends."
Silverwing has the same premise as Aesop's fable. Many years ago there was a battle between the birds and the beasts. Because of the bats' actions in the war (the bats claim they didn't choose a side, the birds claim they switched sides) all bats are banished to the night.
In the Sword of Truth series, the nation of Galea withdrew from a war against the Imperial Order after a new queen came to power, declaring itself neutral. It had previously been allied with the Order's enemies. To absolutely no one's surprise (except apparently the queen's), the Order quickly conquers Galea.
Briefly discussed in Mariners of Gor when there's a mutiny on board a ship. The narrator and some of his friends consider just staying out of the conflict altogether, but then they realize that whichever side wins will punish them for not taking their side, so they arm themselves and fight on the side of the established authority.
Early on in Dante's Divine Comedy, he meets the Uncommitted, who refused to choose good or evil in life. As a punishment, they are forced to eternally chase after a banner while being stung by wasps.
In Melisa Michaels' Literature/Skyrider series, although they admire her skill, a lot of belters don't trust Skyrider because she tried to remain neutral in the last war. On the other hand, a lot of Earthers don't trust her because she's a belter.
The Vorkosigan Saga has Komarr. When Barrayar was rediscovered, Cetaganda saw it as an area ripe for expansion. The Komarrans, who occupy the only route to Barrayar, let the Cetagandans through in exchange for protection and trade rights. The Barrayarans fought off the Cetagandans, and proceeded to attack Komarr in revenge, making a colony of their empire.
The Arn from Animorphs wanted no part in the war with the Yeerks, and went as far altering their own physiology so they couldn't be forced into it by the Yeerks, who can possess other species. They thought this would make the Yeerks leave them alone, but instead the Yeerks just used them for slave labor, and target practice.
A Song of Ice and Fire: The Late Lord Frey gained his nickname for his (in)actions during Robert's Rebellion, in which he was a Tully vassal (and so supposedly on the side of Robert Baratheon), but while he called his banners and mustered an army, the Freys stayed at home until the decisive Battle of the Trident, at which point the Freys arrived just after the battle had been fought. While they claimed to have merely been delayed and always intended to join in on Robert's side note In fairness, Robert was noted for swift decisive marches, and at one point fought three battles in one day at three different places, so it is somewhat possible they were genuinely delayed and just didn't manage to catch up, no-one really believed or trusted them sincenote especially after the Red Wedding.
The world during the Tribulation period in the Left Behind series isn't a place for anyone to claim neutrality. If you don't get killed by Nicolae Carpathia and the Global Community for not being loyal to him (and even if you are loyal, you're still screwed no matter what), God will send you to Hell for not taking His side in the cosmic conflict.
In Island in the Sea of Time, Pamela Lisketter and her followers make the incredibly short-sighted decision to aid Walker in betraying Nantucket, in part because they don't want the fledgling republic to enter the war between the Fiernan Bohulugi and the Iraiina. Not only do their decisions actually end up ensuring that Nantucket goes to war (because Walker immediately goes off and begins arming the Iraiina), but they themselves are mostly wiped out when their subsequent attempt to make an alliance with the People of the Jaguar God goes horribly, horribly wrong...
Pretty much everything that goes wrong for Sam in Revolting People is because he doesn't want to upset the British, but he doesn't want to reject the rebels either. One episode opens with him having a nightmare that he's gone to Hell for refusing to pick a side.
Because Warhammer 40,000 is a crapsack universe, this trope is rarely in play. Most Imperial citizens don't get the option of staying neutral or even picking a side. If someone does stay neutral in a conflict, the best outcome they can expect is summary execution once the fighting is over. Generally everyone knows this and is not stupid enough to tempt fate. Of course there have been exceptions.
During the early days of the Horus Heresy, the planet Bastion declared itself neutral and invited representatives from Horus and the Emperor to make a case for which side the planet should join. Horus's representative blew up Bastion as an example to any other neutral planets: Ally with the Imperium and die.
Some suspect the Dark Angels stayed out of the Horus Heresy to wait and see which side won. The truth is more complicated, but it's one of many things that have raised suspicions about the Chapter's motives.
Historically a problem for the Independent Sidereal Exalted. The Sidereals are politically divided between the ruling Bronze Faction and the opposition Gold Faction. As factional politics almost completely supersede the official duties of the Sidereals, the few Sidereal Exalted who refuse to get involved and instead do their official jobs got politically dumped on by both factions. However, this is breaking down in the Time of Tumult, and more and more Sidereals are refusing to play their elders' games.
In the Points Of Light setting for Dungeons & Dragons, "Dusk Elves" are an elven sub-race that tried to stay neutral during the big war between Corellon and Lolth that created the Elves (from Eladrin that were stranded in the mortal world) and the Drow (the Eladrin who sided with Lolth). No sooner was the war over than Eladrin and Elves alike turned their hands against the Dusk Elves, blaming them for the cost of the war, with full support of Corellon. If it wasn't for the goddess Sehanine deciding to shield them because they had, technically, been loyal to her teachings, they would have been wiped out.
In Civilization 4, if you try to remain neutral and not ally with other countries involved in a war with each other, they'll get mad at you. Your points with the countries will go down.
In Fire Emblem: Radiant Dawn, Dragon King Dheginsea stubbornly tries to have the country of Goldoa remain neutral for 1,000 years to satisfy the terms of the covenant with the goddess Ashera. He ends up having one of his children killed and another one forced into exile because of his insistence on neutrality.
Total War Shogun 2 has your daimyo get points detracted from their honor if you refuse to come to an allies aid in a war (declaring war on the faction they are against).
In Star Trek Online, this is the fate of the Romulan player - he/she refuses to get involved with everything going on and live a peaceful life in another world away from the wars going on. Then, the Elachi and the Tal Shiar descend on his planet and ravage it.
In The Elder Scrolls V: Skyrim Jarl Balgruuf attempts to remain neutral in the conflict between the Imperials and the Stormcloaks, but the city winds up subject to a siege regardless and depending on which side you pick Balgruuf may wind up losing his position.
In Final Fantasy XIV: A Realm Reborn, when the Empire finally goes on the offensive and the Grand Alliance is forced to mobilize, Ul'dah, Limsa Lominsa, and Gridania call for aid from the fellow Eorzean city-state of Ishgard. The Ishgardians, however, are occupied in a holy war against all of dragonkind, and the city's theocratic rulers refuse to help. This created much ill will, with Ul'dah's representative being particularly bitter that Ishgard's crusade takes precedence over The Empire bearing down on the whole of Eorzea. The aftereffects of this decision from Ishgard have not been touched upon yet, however.
In The Order of the Stick, Therkla the half-orc falls in love with Elan while on an assignment from her master, Lord Kubota, to kill Hinjo (whom Elan is bodyguarding). She tries her best to protect Elan while still serving Kubota, and in the end tries to convince Elan and Kubota to simply let each other be. Unfortunately Kubota believes in With Us or Against Us and fatally poisons Therkla. Doubly painful in that Elan was never going to reciprocate Therkla's love.
In Beast Wars, Tigatron resigns from the Maximals and the Beast Wars after he accidentally causes the death of a friend. Dinobot pretends to invoke this trope to get Tigatron back on side, but it doesn't work. At that point Dinobot tries to invoke the trope for real, and would have killed Tigatron if Optimus hadn't turned up in time. In the end Tigatron rejoins when the Predacons make it clear that they'll only do more damage if they aren't opposed.
Niccolò Machiavelli explicitly advises against taking the neutral position: you'll only end up as a prize for the winner. Better to be winners together, or even losers together (you'll support each other) than someone's dessert.
Neutrality in any conflict can also risk incurring the hostility of both sides rather than neither, leading to the expression "those who stand in the middle of the road get hit by traffic going both ways".
The Neutral Nation was a group of Native North American tribes of the Iroquoian branch of the Hokan-Siouan linguistic stock that occupied territory along the northern shore of Lake Erie. The French gave the Neutral Nation its name because of its neutrality in the Iroquois-Huron wars. They were able to remain neutral because they controlled flint grounds useful for making spears and arrowheads. Once gunpowder was introduced into the conflict, and once the Neutral Nation absorbed the remnants of the Hurons, the Iroquois practically destroyed them. Possibly doesn't count because of the influx of Hurons, although the Neutral Nation would certainly have been better off allying with the Iroquois early on.
Vichy France was this played straight. It still controlled a large empire and navy and the Allies stomped on it several times, either because it happened to be in the way of planned operations or because its possessions were perceived as a threat. After Operation Torch the Germans got in on this, finally subjugating Vichy. In essence Vichy was everybody's Butt Monkey.
The logic behind Vichy France's existence was after being invaded by Germany, it was decided that the prime French real estate would be occupied by Germany, with a few scraps given to Italy for being good sports, but that a good majority of French land would remain with the French government. The idea of a still-independent France was enacted so that there would be no government in exile that the French people could rally behind, as there was a sovereign French government that (in theory) was not controlled by Germany that they could give loyalty to. Apart from some territorial claims there were relatively minor in the grand scheme of things, France even kept control of its overseas colonies. It didn't quite work out as intended: A "Free France" movement was born in England that broadcast rebellion propaganda to the mainland. The French government, severely disorganized and gridlocked prior to the war, reorganized itself into a totalitarian dictatorship with a World War One war leader Marshal Petain as its head. Petain collaborated in many ways with Hitler's regime, but did not become full allies with Germany. So rightly or not, Vichy France was seen as too Fascist for the Allies to be comfortable working with (plus they had an alternative), and too independent-minded (and presumptuously demanding) for the Axis to take on as full partners.
Belgium attempted to be neutral during the opening years of World War II, even refusing the Allies to build any defence lines inside their borders or let them to land on their beaches; so when Germany invaded Belgium, they didn't have anyone to help them defend their country from German conquest.
To be fair to the Belgians, the Allied war plan was to fight on the Belgian soil so that they didn't have to fight on the French, and they sort of succeeded because the Maginot Line made a very bad idea for the Germans to attack France directly—except that they didn't plan for any kind of enemy action on the grounds that it was too risky for Germany to try it. This was poor (Campaign/Operational) planning in the extreme - the whole point of planning is to be prepared for all possibilities, not just the ones you want to be true!
The Norwegians attempted to be neutral at the beginning of World War II. Both British and Germans would have preferred that they stayed neutral, too—as long as the neutrality would be bent to their own advantage. When it became clear that their enemies would happily violate Norwegian neutrality when it suited them and Norwegians lacked both ability and willingness to resist meaningfully, both British and Germans decided to intervene militarily in Norway.
This is perceived as one of the reasons that newspapers are dying. Lots of people would rather get their news from an explicitly ideological source on cable TV or the Internet rather than read some bland centrist account in a newspaper, presuming they are centrist and don't have their own biases. The latter in fact is more likely; historically newspapers were more than happy to take sides on just about any issue, and were usually published with a specific agenda in mind. Said initial agenda could be alluded to in the names of some of the smaller papers. The ideas that news should be 'neutral' and that 'commentary' should be separate from the news are relatively recent concepts.