In the anime version of Valkyria Chronicles, Episode 12 has Welkin and Faldio team up with Jaeger and Selvaria to foil a plot to kidnap Princess Cordelia (and Alicia, who was captured in the process) and use her to BS an impromptu alliance between the Federation and Gallia, which is really a cheap way for Prime Minster Borg to usurp the throne "legally" and force the Imperial forces into a two front war situation, which at best leaves him in control of Gallia with Federation backing and gives the Imperial forces pause, or at worst ensures the Imperials are forced to fight a much bigger enemy on two fronts, with either outcome leaving him at an advantage. Everyone launches obvious objections to Welkin's proposed Enemy Mine until Welkin points out the massive mutual gain they stand to profit from, leading to a brief Imperial-Gallia alliance to foil the plot.
It's a mixed bag in StrikerS. On the one hand, most of the Numbers were headed in the right direction as of the epilogue and eventually joined either the Saint Church or the TSAB afterward, Lutecia has her mom back, and Agito had performed a full-fledged Heel-Face Turn and joined up with Signum to defend the city from Jail's drones. On the other hand, Jail and his most loyal cyborgs are cooling their heels in prison instead of making friends with the Aces.
In Pokémon, the heroes are forced to work with Team Rocket every once in a while, most often in the movies where the whole world is in danger. It happens the point the trio performs a Lampshade Hanging on it in Movie 8:
James: Looks like everything's back to normal. Jessie: Which means we're back to being losers.
This is the whole plot of the episode "Pikachu Re-Volts". After Jessie and James's Pokemon are controlled and taken by their fellow Team Rocket members, Cassidy and Butch, Ash and company team up with them to get the Pokemon back.
The most bizarre version of this has to be the Season 7 episode "The Bicker the Better", where after much squabbling between males and females, Jessie recruits a (slightly reluctant) May into a tag team battle...versus James, who also formed an alliance with Ash, in what Brock calls "the battle of the sexes".
And in a first season episode, Ash and the gang even help Team Rocket try to kidnap the Monster of the Week: a Snorlax, which they thought was the one causing the drought in a nearby town.
A more traditional example is in the Tag Battle Tournament mini-arc, the finale of the first Diamond and Pearl season. Ash and Paul were randomly picked to compete as a team for a pair of Soothe Bells as the prize. Paul just wanted to get some experience for his team, none of the happiness items for him. The results were not pretty, even though they managed to win.
Happens fairly often in Pokémon Special. Sabrina, Koga, and Lt. Surge of Team Rocket aid the protagonists against the Elite Four in the Yellow chapter, while Lorelei of the Elite Four helps the protagonists when Team Rocket invades her hometown.
Near the end of Pokemon Diamond And Pearl Adventure, Cyrus and his three top officers team up with the heroes to stop Charon from taking over Sinnoh. When he was last in power, Cyrus had attempted to destroy the universe.
In Yu-Gi-Oh!, Yugi and Kaiba are frequently forced to team up against a bigger threat, and it almost always ends with Kaiba walking away muttering about how he is destined to beat Yugi someday.
Yugi and Kaiba are more like rivals than enemies - Kaiba is never actually on the 'evil' side.
Also, Malik and Bakura's alliance, specifically in the duel against Yami no Malik.
Similarly during the formation of the same team in Yu-Gi-Oh! The Abridged Series, Marik proclaims, "And the enemy of my friend is also my enemy!" Bakura informs him that's not how it goes.
Gundam 00 has the alliance between the Big Three (Union, HRL, AEU) which was formed to defeat the rogue paramilitary organization Celestial Being.
In Episode 17, all five sides (Celestial Being, Katharon, the coup d'etat forces, the regular Earth Federation military, and A-Laws) temporarily dispose of their hatreds in a Crowning Moment of Awesomefor all sides that involves stopping a potential Ice Age and the slaughter of tens of millions of lives by shooting down the countless falling pieces of the destroyed Africa Orbital Elevator.
Later in season 2, the Federation army reluctantly allies itself with bitter enemies Celestial Being and Katharon against the A-Laws and the Innovators.
In Death Note, Near and Mello are bona fide enemies, despite being Worthy Opponents. When Kira manages to be a bigger fish to fry than they had expected, they do end up de facto needing to work together, using the only female on their of their teams as a liaison, and pretending viciously that they want nothing to do with each other.
Near's pretty clear that he'd have no problem working with Mello, to the point that it could be argued he does want to. Mello's the one who wants nothing to do with Near (besides win against him) and tries to verbally pretend he's not helping. "Near, I have no intention of working with you. However, it wouldn't be right to just take my picture and leave. So, I'll settle my debt." Afterward, he still maintains contact with Lidner but pointedly doesn't dwell on the fact that he knows that Near knows about the contact.
Also, at one point the investigation team is forced to temporarily ally with Kira himself, as one of the Death Notes ends up in the hands of the Mafia, something that both sides consider the worst possible scenario.
Also in the first arc when the Second Kira first appears L agrees to let Light work with the taskforce to use one Kira to lure out the other in order to get evidence on both of them. Light finds this fortuitous because then he can keep tabs on both L and the Second Kira.
The entire Yotsuba arc can be considered this, with Light and L working together to track down the new Kira. Light's temporarily turned good thanks to a Memory Gambit, but L accepts working with him despite still being suspicious of him.
Code Geass has Lelouch and Suzaku teaming up to get rid of the Kyushu invaders.
Then a season later they team up again to conquer the world, make themselves out to be two of the most hated people in history, dress Suzaku up as Zero after faking his death, then assassinate Lelouch in a highly public manner in order to bring about world peace.It worked.
Happened at least thrice in the first season of Corrector Yui, where Yui and War Wolf had to teamwork to save either themselves or others. Also happened in the second season of the anime, with Yui and Dark Magical Girl Corrector Ai.
Lupin III: Inspector Zenigata is usually willing to team up with Gentleman Thief Lupin whenever it involves taking down a more clearly evil criminal (which is surprisingly often). This is implied to be main reason why he hasn't been fired yet.
In Dragon Ball Z, Goku and Vegeta's alliance initially starts when they both team up to fight Frieza, the former to save the Universe, the latter because he wants to avenge his pride by defeating Frieza because he was used by him constantly. He ends up redeeming himself and forming a family with Bulma, though he maintains his rivalry against Goku.
And before that, Piccolo joined Goku, and later the rest of the cast to fight against the Saiyans. For viewers who joined the show at the start of the Z series, their past history with one another could easily be missed or forgotten.
For a while, Dragon Ball had a pattern where the main antagonist of the previous arc would team up with Goku against the villain of the current one, earning good guy status in the process. This started with Yamcha (who tries to rob Goku in his first appearance) and continues all the way to Freeza, when Toriyama finally gave us a villain too evil to ever join Goku. Here is a list of some of the former villains who joined Goku, mostly through Enemy MineHeel Face Turns: Oolong, Yamcha, Puar, Tien, Chao-tzu, Piccolo, Vegeta, Android #16, Android #17 (though he never actually met Goku before leaving off-screen shortly after his turn), Android #18, Dabra (according to anime filler in Other World), Majin Buu, Nuova Shenron (in GT), and Abo and Kado (in the recent special which introduced Table to the world).
Actually, he made all his friends by fighting them first, except for Roshi, Krillin and Lunch.
And Krillin was his training rival for a while.
Near the beginning of the Android Saga, Krillin mentions this pattern when Bulma asks the guys why they don't just find Dr. Gero and stop him from ever creating the Androids. So long as they have a common enemy, Vegeta is less likely to revert to being a full-blown villain.
Every time Gun for Hire Katana joins the rest of the Techode pilots in Gad Guard to stop a rogue Gad from destroying everything it touches. Interesting in that half the team (both girls, who met him under different circumstances) don't consider him an enemy. His adorable Morality Pet helps.
The Impel Down arc in One Piece was one big Enemy Mine moment. Luffy has infiltrated the Impel Down prison in order to free his older brother who's being held on the lowest level. During the infiltration he ended up "teaming up" with two former enemies (Buggy the Clown and Mr. 3) who are constantly trying to go up and out, only seeing Luffy as a means to distract the guards. But, through various mishaps they end up falling down to the lower levels anyway and find themselves forced to co-operate in order to stay alive.
In Level Six of the prison: Luffy teamed up with Crocodile. Let me say that again: Luffy teamed up with Crocodile. This is another one-sided Enemy Mine situation, though. Crocodile's willing to work with Luffy, but he's evil enough that Luffy is highly reluctant to take him along. Mr. 1 also joins them, but Luffy never met him before, and doesn't know who he is. Of course, Impel Down is such an awful place, if anything warranted an Enemy Mine with any of Luffy's old foes, this would.
Taken Up to Eleven in the Whitebeard War arc. Crocodile protecting Luffy, fighting alongside the Whitebeard pirates, and generally being the closest thing to altruistic he's ever been thus far. Buggy fights on Luffy's behalf (even if Luffy forced him into it). This war is absolutely crazy in the temporary partnerships it has formed.
Earlier on, Luffy's crew, the Galley-La company, and the Franky Family, despite having fought in a three-way battle before, team up when they realize that they're facing the same enemy, albeit for different reasons (rescuing Robin, dealing with Iceberg's assassins and preventing Pluton's revival, and saving Franky, respectively). Then again, the Galley-La crew had been fighting the Straw Hats under the mistaken belief that they were responsible for the attempt on Iceberg's life, which they just realized.
Luffy and his crew have also had to team up with Smoker and Tashigi a few times due to circumstance, once during the Alabasta Arc and once in Punk Hazard. Though it should be noted that they're not villains per se, just Marines that would very much like to capture the Straw Hats.
During the Punk Hazard arc, there's actually two Enemy Mine situations: the Straw Hats form an alliance with Trafalgar Law (and by extension, his crew) to capture Caesar Clown and take down one of the Yonko (Kaido, to be exact), and both groups end up teaming up with Smoker and Tashigi again, this time to rescue the children Clown had kidnapped and escape the island safely.
In Ranma ˝, several Enemy Mine alliances emerge among the various members of the Love Dodecahedron. Shampoo, Ukyō and Kodachi regularly team up against any external threat to Ranma (or a new potential suitor). Ranma himself teams with Ryōga and Mousse against Prince Herb. Ranma and Ryōga do this often enough that they inch into Friendly Enemy territory by the end of the series.
And inverted with Ryōga and Mousse in the anime: although they aren't enemies when they initially team up against their common enemy Ranma, by the end of the episode, they work so poorly together that they can't stand each other. The fact that Mousse is far more ruthless than Ryōga, and also has no qualms whatsoever about hurting others to get rid of Ranma — even Akane Tendō, Ryōga's oblivious crush — does not help matters.
In the Three-Tails filler arc of Naruto, Naruto ends up working with Guren to escape the inside of the Three-tailed beast. The fact that they both have an interest in Yukimaru's welfare and neither wants to see the Akatsuki get the beast helps, too.
This is also the reason for the very existence of the shinobi alliance, rival nations working together to stop Obito Uchiha from executing his moon's eye plan. Though by the end the alliance is in Fire Forged Friend territory, as fighting on the same side made most of them (including the leaders) realize that they're Not So Different.
In one of the Haruhi Suzumiya short stories, the SOS Brigade has to team up with their perceived rival club the Computer Society, in order to stop the plans of the nefariousStudent Council President from evicting the Brigade from their clubroom.
Occurs twice in Kenichi: The Mightiest Disciple, in Kenichi's last battles against Hermit (a.k.a. Natsu Tanimoto) and Boris Ivankov. Both times, a problem occurred to interrupt the battle, and Kenichi would team up with the person he had been fighting moments ago to resolve it, mostly because one party (Hermit in the first, Kenichi himself in the second) didn't want their opponent to get injured and thus be unable to finish the battle. Naturally, the instant the problem is resolved, both cases have Kenichi and his enemy resume the battle, but Hermit at least would later become a full-time ally (Boris may do so as well in the future, but for now, he's been Put on a Bus).
Sara and the Space Squadron make amends with Mariette and her Gambee pilot brigade (sorry, but it doesn't have a name and both common fan nicknames exceed this wiki's age rating) to defend the Libertad in the end of Soukou no Strain.
In the finale of Night Wizard, after spending the entire show chasing the heroes, Bell Zephyr ends up fighting alongside them to defeat the true Big Bad.
Pixie Misa does this twice in Mahou Shoujo Pretty Sammy. In the same episode. Misa and Sammy also team up briefly in the second and third OVAs.
All the non-Shinryuuji Naga players on Team Japan and Agon in Eyeshield 21. And to a lesser degree, all the non-Hakushuu Dinosaurs players and Gaoh (especially Kid, Hiruma and Banba).
In order to further her plans, Medusa joins forces with Shibusen and leads a team to infiltrate Baba Yaga castle, the Arachnaphobia base.
Werewolf Free and shinigami Death the Kid fight Mosquito together. Neither are happy about the idea.
During a match in the individual tournament in Saki, everyone in the table gangs up on Saki, despite one of them being her own teammate (although said teammate mentally notes that they are in competition with each other and Saki promised not to hold back). It doesn't work.
In Saki Achiga-hen, this happens in the semi-finals, when Toki, Kirame and Kuro go up against Teru, the champion of the mahjong tournament, in order to avoid going below 0 points, resulting in some unspoken cooperation between Kirame and Toki, with Kuro unwittingly helping by preventing Teru from getting dora and making it more difficult for her to increase the value of her hands. In the end, Kuro breaks Teru's winning streak, and while Teru ends the first round with an overwhelming lead, it's eventually reduced to the point at which her school barely advances.
A more complicated example comes up in Kiyosumi's turn at the semi-finals. At the start of the third round, Rinkai and Himematsu have a comfortable lead, while Kiyosumi is a distant third, and Usuzan is dangerously close to being eliminated. Knowing that if Usuzan goes under while Kiyosumi is still in third place, they'll both be eliminated, Hisa decides to protect Usuzan's points while winning off Himematsu and Rinkai. Unfortunately for Hisa, Usuzan's third player realizes that it's just as advantageous to win off Kiyosumi as the other two.
In Fullmetal Alchemist, Envy works briefly with Ed and Ling when they have to get out from Gluttony's stomach.
Scar joins up with the protagonists when they have to defeat Father. Envy lampshades the absurdity of it all. "What?! You're friends now? You guys are no fun at all! Ugh! What happened to trying to crush each other's windpipes?!"
In Spriggan, Spetsnaz officer Victor Shutrov (or Stolov, based on the Singaporean English translation) tries to kill Japanese KGB agent Koichi Moroha when he learns of his plan to dominate the world via the Fire Shrine and not on behalf of the USSR, helping Yu somewhat. He's killed later, not being able to stop the renegade agent. Yu and Jean team with two of their enemies near the end of the manga. They consist of Iwao Akatsuki, ex-Trident Corporation commando, and Bo Brantz, ex-Neo Nazi and ninja, to defeat Larry Markson from using the natural energy of Gaia in the South Pole.
In Berserk, Guts and Zodd have an AWESOME one of these when they temporarily team up against the Emperor Ganshika, who is a giant fog/storm cloud apostle. Naturally, they do it in the most badass way they can. Schierke finds Ganshika's "core", the only really physical spot in his apostle form, but says that only a powerful magical weapon can do anything. Guts has been slaughtering demons, apostles, and other nasty spirits every single day and night, for about three years straight, with his BFS and so all that pain and hate has made it a magical weapon. Zodd, in demon form, lets Guts ride on top of him, and they use the Dragonslayer to ram Ganshika's 'core'.
Even though catching the Kaitou Kid is one of Detective Conan's chief aims, second only to busting up the Black Organization, Conan often ends up working together with Kid to catch bad guys or otherwise avert disaster, especially in his Non Serial Movie appearances. (For that matter, he has occasionally worked together with Black Organization agents against other Black Organization agents, as well.) His TV-special team-up with Lupin III would probably count as well.
Kougaiji'steam and the Sanzo party do this or help each other out in some way so often in Saiyuki that Kougaiji's "it would be unfair to attack you now but next time we will get the scripture" is met with "yeah, yeah we know."
Happens accidentally with comedic villain Zakuro. Goku—who wasn't around for Zakuro's first appearance and has no idea who he is—helps him when he's passed out from hunger, and Zakuro tries to repay him by defending him from a group of random youkai thugs. Zakuro is horrified when he realizes who Goku is, especially when the rest of the party show up and cheerfully tell the youkai that Zakuro has totally come over to their side.
In the final 3 chapters of Psyren, Yoshina Ageha teams up with Amagi Miroku against Mithra.
In InuYasha, anytime Inuyasha and Sesshomaru team up, this happens, though at the end of each scenario Sesshomaru walks off just a little more of an Anti-Hero than before.
In the final episode of Giant Robo, Alberto suddenly appears to rescue Daisaku. He deems it necessary to point out he hasn't made a Heel-Face Turn, it's just that they have a mutual enemy.
Attack on Titan discusses the whole idea of the whole of humanity settling its differences with each other to fight a common enemy, finding it overly optimistic. Indeed, even in the story, with humans on the brink of extinction against such an enemy, there'sstill plentyof infighting.
The Visoreds in Bleach claim that they're not Soul Society's allies; they're Aizen's enemies and Ichigo's allies. Upon Aizen's defeat, the Visoreds are accepted back into the Soul Society.
In the final arc, several Arrancar (Aizen's former Henchmen Race) team up with Ichigo's crew in order to combat the Wandenreich, who have occupied the Arrancars' home in Hueco Mundo.
This is actually taken to an extreme in said final arc: Yhwach is such a threat to existence that everyone is teaming up to stop him: specifically, Ichigo's group, their allies in the human world, Urahara's group, the Shiba family, the Shinigami, the Visoreds, the Arrancar, and the Fullbringers are all putting aside their differences to stop one man.
In Chapter 587, Bazz B offers to help the Shinigami take out Ishida Uryuu when they find out he's helping the Vandenreich, saying the Sternritter don't like him either. Of course, the Shinigami refuse; they still like Ishida.
At one point in Full Metal Panic!, Sousuke comes upon Leonard and pulls his gun — but Leonard points out that they're both in the same predicament (trapped in an old laboratory by rubble) and proposes they call a temporary truce and work together to dig themselves out, to which Sousuke agrees. During this time Leonard tries to talk Sousuke into joining his side, but is (obviously) unsuccessful; the truce lasts until they get back to their respective Humongous Mecha.
In episode 3 of Blade And Soul, the Pleasure Gang saves Alka from the Bounty Hunter, Hazuki, trying to collect on a bounty of 7000 gold from the Palam Empire. Their leader, Dan Roana, has no love for Palam either, and many of their friends and relatives were killed by them, so she suggests they work together to get their payback.