In one episode ("Just a tad smarter"), Toadie's cousin Tadpole takes over Castle Drekmore, kicks Duke Igthorn out, and orders the ogres to destroy all the gummiberry bushes. Neither Igthorn nor the Gummis want the bushes destroyed, so they reluctantly team up to get rid of Tadpole.
In another episode("For a few sovereigns more"), Duke Igthorn hires a bounty hunter to catch a Gummi Bear. When the hunter returns with Cubbi Gummi but Igthorn refuses to pay, he and Cubbi are tossed into a dungeon cell, and have to work together to escape. That episode was a Chained Heat, as well.
In "The Chase", the gang inadvertently work with Zuko and Iroh to corner Azula. This gets broken when Azula attacks Iroh while he's distracted.
When Zuko has a Heel–Face Turn and joins the Gaang. Included here because, while Zuko truly wants to switch sides, the Gaang (especially Katara) still views him as an enemy for some time. Nevertheless, although the only reason the Gaang agree to join up with him is because Aang needs a firebending teacher, the two of them eventually decide to put their differences aside when they discover that they have more in common than they think, so it's not long before they're working smoothly together to take down the Big Bad (Zuko's father), becoming literal Fire-Forged Friends in the process.
Iroh asks for the Gaang's help to save Zuko, while the Gaang needs help to save Katara. This is a very mild example since Iroh was practically on friendly terms with Toph already and Iroh was never that much of an enemy in any meaning of the word, but Aang and Sokka are suspicious at first.
The Legend of Korra has an uneasy alliance between Korra's team and Varrick. They don't trust him, since Varrick was manipulating the Water Tribe Civil War from the start, but both parties do hate Unalaq. After all, success against Unalaq did depend on whatever Varrick could contribute, even if it was going to harm them.
This happens again in Book 4, when Zaheer, Big Bad of the previous book, helps Korra overcome her trauma at his hands so she can defeat Kuvira, who is everything Zaheer hates. By the time of the finale Kuvira had a Humongous Mecha, making the situation so dire that Lin had to release Hiroshi Sato to help them defeat it. Sadly, Sato doesn't last.
In "The Trial", which featured the city's new District Attorney blaming Batman for all the superpowered criminals in Gotham City. This eventually leads to the DA being kidnapped by the villains and Batman being captured while trying to rescue her. The villains then put Batman on trial for ruining their lives and turning them into criminals, and they make the DA serve as Batman's defense lawyer. The DA demolishes the villains' claims one by one, pointing out that they were all responsible for their own problems and would have become villains anyway; the only thing Batman really influenced them to do was wear costumes. The villains are forced to acquit Batman, but they decide to kill him and the DA anyway For the Evulz. Now that the DA has done her job, it's time for Batman to do his...
Then there was the episode "Harlequinade", where Batman recruited Harley Quinn's help to find the Joker when he stole a nuclear weapon (offering her parole as an incentive). Harley didn't quite manage to stand up to Mistuh Jay in this episode, but she came close. (She would eventually, later.)
In the episode "Game Over For Owlman", Batman is forced to team up with his arch nemesis, The Joker after the rest of the heroes of the series become convinced he has become a bad guy thanks to the machinations of his Evil Twin Owlman.
And again with Two-Face in the beginning of "The Fate of Equinox", after his hired henchmen go against his decision to spare Batman.
A similar plotline occurred in The Batman, when the villainous residents of Arkham Asylum, freed by an alien invasion, join the fight against the aliens, with the Joker angrily stating that causing mayhem in Gotham is his job. He goes so far as to gleefully proclaim that the whole world has gone mad after seeing Gordon and Freeze protect each other's backs.
In "Marabounta", Jérémie's newest attempt to destroy XANA goes haywire and threatens to destroy Lyoko itself. XANA sends monsters to help the good guys destroy the threat. When the combined team is victorious, the heroes expect the monsters to immediately turn on them. Instead, the monsters bow and then leave without incident. (Jérémie does warn everybody that this truce was clearly temporary.)
In the following episode, "Common Interest", Jérémie and XANA team up to save Lyoko and Aelita when the uranium battery that powers the Supercomputer starts dying. This time however, XANA does strike back immediately after the teamwork is through.
The first instance was in "Operation: Z.O.O." when the team cooperated with the Delightful Children after both were help prisoner by an evil zookeeper. (It turned sour rather quickly, as the villains were only too willing to turn on the KND once they were loose.)
Played for Laughs in "Operation: M.U.N.C.H.I.E.S." After Sector V spent the whole story fighting nearly ever villain in the series over the last box of cereal in a supermarket, Knightbrace grabs it, but intends to destroy it, not eat it. So the heroes call a truce with the other villains to get from him. (And then all of them are able to share it at the end, making it a happy ending for everyone except Knightbrace.)
Operation: Z.E.R.O. had Numbuh 1 and his father, Numbuh 0, team up with Father and the Delightful Children from Down the Lane a.k.a. Sector Z to stop Grandfather. The alliance quickly peters out when Father loses motivation (despite being implied to be stronger than Grandfather) and buggers off to go binge on ice cream, while Sector Z is forcibly transformed back into their Delightful forms and attack Nigel.
Danny and his ghost hunting rival/enemy Valerie work together to outdo Skulker once they stop trying to torment one another. Being handcuffed together didn't help matters.
In the first movie, "Reign Storm", Danny, Vlad, and Valerie had to team up to try and take down the much greater threat that was Pariah Dark. In fact every enemy ghost came to help out during the final battle. (Except Dark Danny, for obviousreasons.)During the final battle:
Skulker: Now, go! Defeat him, so I will be free to hunt you another day!
Danny: (to Ember) Guy really knows how to motivate you...
Danny teamed up with the rest of his foes to break out of Walker's prison in "Prisoners of Love."
Danny and every single ghost in existence teaming up to turn the Earth intangible in "Phantom Planet." Wow, he does do this a lot!
In the Christmas Episode, when the Ghostwriter tried to teach Danny a lesson, all other ghosts Danny met in the episode agreed to help him because the Ghostwriter broke the Christmas truce.
In "Livin' Large", the Guys in White tried to blow up the Ghost Zone, unaware that it'd destroy Earth as well, and Danny teamed up with some of his ghostly enemies to stop them.
Danny and Valerie teamed up again in "D-Stabilized" to defeat Vlad and save Dani. Bonus points for Valerie discovering Vlad's secret identity at the end!
The title character of Darkwing Duck regularly teams up with his nominal enemies against more powerful foes.
Electrical supervillain Megavolt has joined forces with Darkwing several times.
When the two fight on the same side against an enemy that threatened to destroy St. Canard, Gosalyn asks Megavolt why he's helping out. Megavolt explains that if the Big Bad destroys the city, there'll be nothing left for him to rob.
After Megavolt's Electrolyzer malfunctions and sends him and Darkwing into the human world in "Twitching Channels", they are forced to team up to find a way to return to their world (though Megavolt tries to double cross Darkwing at the last second).
Megavolt teams up with Darkwing in order to stop the Gosalyn-shaped representations of radio, light, and heat waves from wreaking havoc upon the city. His excuse for the team up this time? The physical representations of the electromagnetic spectrum hurt his feelings. (Darkwing was willing to work with him because he was an expert in the field - well, the best one that was available, at least.)
One episode features the crimefighter and the duck/plant hybrid fighting together against an invasion of evil cabbages from outer space. Bushroot justifies joining forces with Darkwing as follows:
Bushroot: "Hey, I may be a mutant plant-duck, sure, but I'm an Earth mutant plant-duck!"
Darkwing has to recruit Bushroot's help in "Slime Okay, You're Okay" after the latter's IQ2U potion accidentally creates a giant sentient patch of lawn that threatened to devour them both; Bushroot launches Darkwing past the lawn, where he is able to summon a flock of sheep to devour it. As a gesture of gratitude, Darkwing lets Bushroot go free at the end of the episode rather than arresting him for breaking into the botanic gardens to steal ingredients for the IQ2U potion.
In several episodes, Darkwing teams up with Megavolt, Bushroot, and Quackerjack, plus their fellow Fearsome Five member the Liquidator, invariably when they have been double-crossed by their leader, Negaduck.
The four of them did it the second time the Fearsome Five worked as a team, again after Negaduck double-crossed them. (Apparently, they didn't learn the first time.)
Dexter's Laboratory episode "Let's Save The World You Jerk!"; Dexter and his rival Mandark are forced to team up to stop a barrage of asteroids from impacting and destroying the Earth. Unfortunately, their egos prevent them from cooperating, and they spend so much time fighting that the Earth ends up destroyed, with the two of them arguing over whose fault it was. Good thing for Negative Continuity!
Defied in the episode "The Statue Collection", when both sides get stranded on a desert island and Sgt Blob and Albert are antagonised by a sea monster, Frizz and Nug quickly assemble a war device to fend it off. Rufus and Amberley, convinced it's doing more harm than good (and likely still pissed about them turning Pildit into stone) knock the two out, leaving Albert to take care of the monster by himself.
There were several times where the heroes called a truce with Venger for mutual benefit; for example, "Valley of the Unicorns", one of Venger's servants enacted a plan to take over, so Presto decided the best bet was to tell Venger about it. In "The Box", Venger reluctantly allies with them in order to survive after his demonic master is freed.
Also, the kids form an uneasy deal with Tiamat to fight Venger in "The Dragon's Graveyard".
In the "Wishology" trilogy, all of Timmy's friends and allies except for Mark are captured. Needing help, he recruits Vicky, Crocker, and Dark Laser to battle the Darkness. He needs to offer them something: 20 dollars, a look at his fairies, and an opportunity to destroy him when it's over, respectively.
In the episode "The Witch and the Warrior", Teela and Evil-Lyn are forced to work together when they are stranded in the desert and Evil-Lyn has been Brought Down to Normal. One of the most popular episodes due to all the Les Yay.
There's also the episode with Evil Seed, a plant monster who appears and starts beating down heroes and villains alike. He-Man, The Sorceress, and after much reluctance, Skeletor team up to take the guy down.
Hurricanes episode "Target: Winston" had Winston Honeychurch fearing for his life. Amanda Carey had, at first, believed Stavros Garkos, the series' main villain, was behind this and, along with Stats, went to his hotel room to spy on him but were caught. Wanting to know what Amanda was up to when she accused him, the this time innocent Garkos told his main thugs, Wyn and Genghis, to help her.
Invader Zim: Despite his declaration of "just this once" (quote at top of main page), Zim and Dib of have teamed up at least three times against various crises.
Notable episodes: "Bolognius Maximus", "Hamstergeddon", "Halloween Spectacular of Spooky Doom", and "Tak: The Hideous New Girl".
Subverted in "Planet Jackers": Zim reluctantly tries to form an alliance with Dib, as he requires Dib's telescope (Zim's has been broken). Dib refuses to believe Zim has (somewhat) good intentions and kicks Zim out of his house without allowing time for an explanation.
Subverted (and lampshaded) in "Walk for Your Lives": Zim forces an alliance on Dib, who is the only way to stop a massive slow-motion explosion. Dib (who's also in slow-motion) gets fired out of a cannon into an explosion, causing it to speed back up and finish already. Only an alliance in the broadest of terms.
Zim also provides Dib assistance momentarily in "The Most Horrible Xmas Ever" in order to get rid of/save himself from the Santa suit, but a minute later Zim convinces literally everyone to beat up Dib on grounds that he destroyed their precious Santa. And then the Santa suit ended up becoming a monster that returns to earth every year...
Issue 12 of the continuation comics sees Zim and Dib accidentally slingshotted into a Bad Future where Zim has conquered the world. However, since the two Zims don't get along, the present day one teams up with Dib to defeat Emperor Zim and escape back to the past.
In "The Return". Lex Luthor is forced to work with the League to stop AMAZO, an android he himself had loosed on them in an earlier episode, from killing him. This applies to the League more, as AMAZO isn't out to do anything else not in his way (he moved Oa to another dimension because it was easier than fighting, and fought back against the League because they attacked him), but he is after Luthor, who deceived and manipulated him. The League figures that the android will kill Luthor (at this moment in the series, in a Heel–Face Turn), so THEY decide to help HIM. Part of it was because it was personal to GL John Stewart, as they didn't know he just moved Oa. They saw him approach the planet, give off a flash, and then it was gone.
Wonder Woman and Hades against Felix Faust although this wasn't by choice. She was ordered to reinstate Hades by the Gods, and when she still had some reluctance, it ended when Hermes pointed out how Faust was indirectly harming Wonder Woman's magical friends by usurping Hades' post.
The episode with the Justice Lords. Luthor hilariously teams up with Good Superman just for the pleasure of zapping a Superman, any Superman, with a Kryptonite laser gun.
Good Superman: Go for it.
Luthor: Oh yes.
Darkseid asked the League for help when Brainiac attacked Apokolips in "Twilight". Over Superman's protests, the League agreed. Supes' suspicion was vindicated, since the entire plot was a ploy by Darkseid to hand over Superman to Brainiac in exchange for Apokolips' safety. And that turned out to be an even bigger ploy to grant Darkseid access to Brainiac's systems so he could take control of Brainiac and use its processing power to obtain the Anti-Life Equation.
In the Grand Finale, the title heroine and her partner Ron team up with their longtime foes Drakken and Shego to save the planet from an Alien Invasion. Ironically, Drakken (who never once succeeded in his career as a Mad Scientist, this even being lampshaded by his rival Dementor), came up with a brilliant plan to use his newly acquired plant powers to successfully stop the alien war machines, an act that even Kim, Ron and Shego find to be impressive.
There were previous instances of Kim and Shego joining forces against a common enemy: Kim enlisted Shego's help against an old Team Go enemy in "Go Team Go", and Shego stopped Drakken's new sidekick from beating Kim in "Mad Dogs and Aliens".
Megas XLR did this when Coop and Gorath got trapped in a Mirror Universe and were captured by Mirror Jamie. Then Mirror Jamie joins the Enemy Mine when Mirror Coop shows up to kick their asses. This one almost became permanent after Coop and Gorath succeed in defeating Mirror Coop, but then Megas trips and ends up destroying Gorath's entire army. That ends the team-up.
In Motorcity, "Red" resents Mike Chilton for leading the group that destroyed the home he supposedly lived in. He ends up joining forces with Kane for this reason, despite the fact it was really Kane who is responsible for the destruction of his Motorcity home.
The main plot of Mulan II required the protagonists, under the Emperor's orders, to travel over to Qui-Gong to forge an alliance with the kingdom in what is essentially an enemy mine gambit to defend China from the Mongolians' imminent invasion.
My Little Pony: Friendship Is Magic: In "Viva Las Pegasus", Applejack and Fluttershy have to team up with the Flim-Flam Brothers to defeat Gladmane. The brothers' only reason for helping them was that they wanted revenge on Gladmane for tricking them, and go back to their con artist ways as soon as Gladmane has been taken care of.
In the animated TV show of The Neverending Story, the main character teams up with the evil female character, who even saves him at one point.
The New Adventures of Superman episode "Luminians on the Loose". After Lex Luthor brings the title creatures to Earth, they turn on him and try to kill him. Luthor is forced to team up with Superman to defeat them.
Peter Pan & the Pirates, in one episode Hook put aside his plans to kill Peter Pan and the Lost Boys because he wants to help them play Romeo and Juliet correctly, as the Wicked Cultured he is, doing a join production between Pirates and Lost Boys. Both groups seem trully to be getting along for a while, but then Hook puts real poison for Peter to drink it. When he thinks he accidentally drank itHilarity Ensues as he performs one of the best good bye monologues ever said. It helps that he was voiced by Tim Curry.
Perry the Platypus and Dr. Doofenshmirtz usually have their feud kept to each other, but there were times when they were forced into an alliance whether it's needed or they don't have a choice. In the episode "Primal Perry", Doof hired a platypus hunter named Liam Mc Cracken to trap Perry in the Danville Botancal Gardens, but Mc Cracken betrayed Doof as he planned to turn both him and Perry intro trophies, forcing the two foes to run and fight back against Mc Cracken.
This was happened again in "Phineas and Ferb Save Summer", where Doof is shocked to learn that his rival Aloyse von Roddenstein (or Rodney for short) has formulated a plan to create a new Ice Age based on one of his successful schemes. As such, Doof openly voices his objections to it, knowing that it will endanger billions of lives, though Rodney doesn't care (as he still wants to show everyone who's in charge). As Rodney enacts his plan by disabling the reverse process on his machine that may prevent the cataclysm from happening, this resulted an angry Doof to smack out Rodney and trying to take down the machine. Even Perry too shares Doof's disgust over Rodney's scheme (as the cataclysm would also endanger his host family as well) and personally helps Doof in taking down the machine to save the Earth.
In The Pirates of Dark Water episode "The Game Players of Undar", frog-like creatures effortlessly capture both the main hero and the main villain, handcuff them together, and force them to work together to win a dangerous game on an island for their own amusement.
Episode The Terrible 5 + 1 of Plastic Man mixed with a Villain Team-Up episode; after been freed from prison by Solex, villains The Weed, Half-Ape, Clam, Computerhead and Disco Mummy end joining forces with Plastic Man against Solex, because he doesn't let them do their villain stuffs as they want.
In the 2016 reboot, Bubbles joins Mojo Jojo in a rampage of Townsville after half of her face becomes disfigured, blaming Blossom and Buttercup for it and being shunned by the rest of the city. Doesn't last long, of course.
The Raccoons episode "The Intruders" has the bad guy Cyril Sneer working together with the titular raccoons and their friends in order to save his own son and one of the raccoons who got trapped in his supersafe vault.
In one episode of The Real Ghostbusters, a guy hates chickens so much, that he actually summons a demon to make the standard bargain in exchange for ridding the Earth of them. Later, the demon is so humiliated at having to grant such a silly request (and is the laughing stock of the netherworld), he enlists the help of the Ghostbusters to void the contract. (He is somewhat threatening in the way he convinces them to listen, but it's still an alliance for mutual benefit, so it counts.)
This happens in the second season finale. Bob is forced to team up with Megabyte and Hexadecimal to stop the Web from destroying Mainframe. However Megabyte, being the Magnificent Bastard that he is, takes advantage of the situation to betray Bob and strand him in the Web.
However, an earlier episode has Megabyte actually honoring his commitment. Megabyte's goons steal game energy in an attempt to break into the Archives. Unfortunately for Megabyte, he gets trapped in the game that they steal the energy from. When the User loads a new game and it collides with the current one, Megabyte gets trapped sinking into quicksand while being shot at by a T-Rex with a machine gun. After begging Bob for help, Bob decides to save him. Later in the same episode, Megabyte kidnaps Enzo. After the gateway command is he stole is destroyed, Bob reminds him how he saved him in the game he lets Bob save Enzo without a fight. As they're leaving, Megabyte says, "Now we're even, guardian. Now we're even."
Recess had at least two instances where Randall ends up forging a truce. Not to mention the movie where Randall, Miss Finster and Principal Prickley team up with the kids against a villain that wants to create eternal winter
Samurai Jack: In "Jack and the Scotsman", Jack finds a Worthy Opponent in a Scottish outlaw. Though the two clash in almost every way, they form an alliance against an army of bounty hunters working for Aku, which gives them a newfound respect for each other.
This is the entire premise of Shadow Raiders as four waring planets that has been enemies for generations have to team-up against the biggest enemy, Planet Beast, that treatens all.
One episode of She-Ra: Princess of Power featured She-Ra and Hordak accidentally sent to another dimension and having to join forces to return.
On The Simpsons, Both Bart and Lisa were forced to team up with Bob on two occasions:
Bart and Lisa from teamed up with him in "Brother From Another Series" to stop Bob's brother, Cecil, from blowing up the Springfield Dam to destroy the evidence that he cut back on construction to embezzle funds.
While not quite an enemy mine per se, they also had some help from Sideshow Bob in identifying the real culprit of Homer's kidnapping in "Wedding for Disaster" it was Patty and Selma Bouvier, the latter of whom was ironically a former near-victim of Sideshow Bob.
The Smurfs team-up with Gargamel in a couple of episodes, generally very briefly and normally because they have each other love ones in danger, like some Smurfs and Azrael kidnapped by the same foe or when facing a mutual threat like Nemesis.
Sonic Boom has this as a recurring theme in its episodes. A few examples include:
In "Can an Evil Genius Crash on Your Couch For a Few Days?", after Eggman's Obliterator Bot malfunctions and prepares to destroy his island fortress, Eggman is forced to team up with Sonic and his friends to stop it. Sonic initially refuses at first, until Eggman reveals that if his base is destroyed for real, he will have to stay with Sonic until it's repaired. Sonic decides to help him after all upon hearing that.
The main premise of "The Curse of Buddy Buddy Temple" is that Sonic and Eggman are trapped in an ancient temple that forces them to work together in order to escape from it.
In "Let's Play Musical Friends", Sonic and his friends assist Eggman into sending Orbot and Cubot into the "17-bit" dimension to reclaim his lair and his robots back from Nomanitus, who has overtaken them with a digital virus.
In "Eggman Unplugged", after Eggman gives up technology (save for Orbot and Cubot, mostly so they can pull his Eggmobile), the Lightning Bolt Society takes over his lair, and (inadvertently) unleashes his robots on the village. Towards the end of the episode, when he decides to start using technology again after Dave shuts off Orbot and Cubot, he teams up with Sonic and his friends to sneak into his lair and stop the Lightning Bolt society.
In "Mayor Knuckles", Knuckles abuses his power as the temporary mayor by approving too many laws, one of which involves giving the sanitation engineers vacation time. Eggman isn't up to anything particularly evil in this episode, as he just wants his trash picked up. Sonic agrees to help him stop Knuckles to get the village back to the way it was before.
In "Next Top Villain", Dave the Intern captures Eggman and tries to destroy the village with his Octopus Bot. Sonic rescues Eggman, who assists in helping him get his Octopus Bot back from Dave.
In one episode, Spidey made a temporary alliance with the Rhino to destroy a specs program which gave the owner the instructions on how to make more Rhino-armored supervillains. The original Rhino wasn't too happy about that, so after battling Hammerhead and Silver Sable for it, Spidey offered a team-up. After it was destroyed, however, things went back to normal...
In the first season, Anakin and Obi-Wan temporarily teamed up with Dooku to escape from Hondo's base, where they were all mutually imprisoned.
In the finale of Season 4 Obi-Wan and Ventress team-up against Savage and Maul.
This became the first of a couple of Enemy Mines Obi-Wan had against Maul. In Season 5 he teams up with the pirate Hondo Ohnaka (although his status as an enemy is debatable), and then later the Death Watch member Bo-Katan, who had gone against Maul's take-over of the Death Watch and Mandalore. Bo-Katan even Lampshades this when she does an earlier Enemy Mine with her sister, Satine.
Bo-Katan: The enemy of my enemy is my friend.
Ahsoka and a couple of Jedi younglings also teamed up with Hondo and his pirates in order to fight General Grievous and escape Florrum.
Ventress pulls another Enemy Mine with Ahsoka in the penultimate episode of Season 5 after the latter (mistakenly) convinces her that her former master, Dooku, might be behind the bombing that Ahsoka was framed for, and Ventress realizes that they both have a lot in common, since they were both seemingly forsaken by their masters.
"The Honorable Ones": Thanks to a scene that demonstrates the inadvisability of fighting in an escape pod, Zeb and Agent Kallus wind up stranded on a icy moon of Geonosis and are forced to work together to survive. For added fun, the two are archenemies due to Kallus' involvement in the genocidal campaign that slaughtered the population of Zeb's homeworld. It goes better than you'd think, thanks to the events of earlier episode "Legends of the Lasat" helping Zeb to move on, and Kallus ends up revealing some of his Dark and Troubled Past. The events of this episode end up triggering a full-on Heel–Face Turn for Kallus.
"Twilight ofthe Apprentice": (Darth) Maul briefly teams up with Ahsoka, Kanan and Ezra against the Inquisitors. However, it ultimately turns out to be a Cooperation Gambit, as Maul has ambitions to activate an ancient Sith battle station and make Ezra his new apprentice as a means of getting revenge on all of his enemies, including both the Empire and the remaining Jedi.
In "The Last Battle", the heroes manage to join forces with a group of Separatist Droid Army remnants against an Imperial attack. The two groups part amicably, though General Kalani refuses to join the Rebellion permanently, since he considers their position to be ultimately untenable.
In Steven Universe, Peridot eventually teams up with the Crystal Gems to stop The Cluster, or else they all die. She becomes an official member of the Crystal Gems after insulting Yellow Diamond to her face in Message Received for not wanting to stop The Cluster.
Deliberately invoked by Steven in "Restaurant Wars", when he presents a threat to both Fryman's and Kofi Pizza's businesses to force them to cease hostilities and unite against him. He does this after learning that was how the last Fryman-Pizza war was resolved, years ago.
In Street Fighter episode "Strange Bedfellows" (for those who don't know, it's a former name of this trope), Guile and Bison teamed up against Akuma.
When the "Killer Pizza" monsters go berserk, the Turtles and Shredder have to team up to keep the creatures from killing all of them. It's even given a lampshade by Leonardo and Donatello.
Also happens in the "Turtles Forever" film. Krang and '87 Shredder join forces with the '87 and '03 Turtles at the end to stop the Utrom Shredder from destroying the multiverse.
Shere Khan assisted Baloo in a few TaleSpin episodes. Also in "Stuck On You" where Don Karnage must make a truce with Baloo when they are accidentally glued to each other (and his crew create a mutiny).
The fifth season of the 2003 Teenage Mutant Ninja Turtles series features the Turtles (along with the Ninja Tribunal's human accolades and the Justice Force) teaming up with Karai, Hun, and Bishop to fight the Tengu Shredder.
During the "Return to New York" arc in season 1, when Baxter Stockman betrayed the Shredder and attacked both him and the Turtles, threatening everyone. The Turtles and Shredder briefly join forces to defeat him before resuming their battle.
Done twice in TMNT 2012, once in "Baxter's Gambit" when Xever saves Raphael from the giant fan, saying that only he gets to kill the turtle and again in Annihilation!Earth, when Splinter and Shredder work together to stop the Triceratons, only for Shredder to turn and literally stab Splinter in the back.
Robin must reluctantly team up with Slade to save Raven in "The End (Part 2). Slade uses this time trying to annoy Robin as much as possible, naturally. Later Slade helps them out with Trigon with his extremely badass antler cutting fiery ax. (He didn't have to come back, but he wanted to, because as he put it, "I'm nobody's servant.")
Also the Titans team up with Gizmo to rescue Cyborg. Actually, Gizmo has no choice in the matter as Raven threatens to turn into some demon-monster and devour him if he doesn't. (Robin figured that Gizmo was the only one who was knowledgable enough to repair Cyborg, although a lot of fans did remember Fixit and thought that he might have been a better choice...)
Robin also teams up with Red X in "X" to stop the theft of a dangerous substance. While the last time we saw Red X, he was Robin in disguise this time the the Red X suit was stolen by an unknown person.)
The Troublesome Trucks from are known to play tricks on the engines from being the cause of their accidents to mercilessly make up jokes and songs about them, but they are times where they and the engines can be on the same side when dealing with a common foe. In "Special Attraction", they helped Percy deal with a disagreeable boat named Bulstrode and in "The World's Strongest Engine" when Thomas and Percy lampshaded at the end of said episode that they've learned that even troublesome trucks can do an engine a favor, especially if it's getting rid of an prejudiced, arrogant Diesel.
The Diesel have always had a heated rivalry with "steamies", though there are times even the most prejudiced of both kind have ended up teaming up to solve a dilemma. This is the entire plot of "Calling All Engines" where both must work together to build Sodor's airport, which culminates in Thomas even having to get Diesel 10 for help.
Several Tom and Jerry cartoons have the titular cat and mouse teaming up to get rid of an enemy, such as Dog Trouble, Old Rockin' Chair Tom and Triplet Trouble.
In Transformers Generation 1 it's not unusual to see the Autobots and Decepticons (or expies of them) joining forces to take on a greater threat. It just takes a very large threat to make them do it. Usually Unicron, but not always.
In "The Insecticon Syndrome", Megatron and Optimus Prime fight together against the out-of-control Insecticons. Watching Optimus grab up Megatron's semi-conscious body and force-fold him into gun mode is interesting.
In "Countdown to Extinction", it's Megatron and Optimus Prime cooperating again to stop Starscream'sDoomsday Device. Watching Optimus worry over the damage Megatron is taking to unbolt the device is fascinating.
In "Nightmare Planet", Springer and Razorclaw team up to slay a dragon. Razorclaw was planning to sit back and watch Springer get killed, but a princess bribed him with gold and pointed out that the dragon would most likely kill everybody.
In Transformers Animated, during the second season finale, the Autobots and Decepticons' latest battle is interrupted by Starscream and his clones. The Autobots and Decepticons end up fighting the same enemy, and at one point Optimus and Megatron have a Back-to-Back Badasses moment... only for Megatron to grab Optimus and use him as a living shield. The clones eventually turn on Starscream later, join Megatron, and everyone is back to square one.
In Beast Machines, the Maximals join forces with the surviving Vehicons to survive when Savage appears.
Earlier, in Beast Wars, this happened a ton between the Maximals and the Predacons, always during story arcs where the Vok, the godlike beings using Earth as their own Petri dish, become active again. For example:
The entire final arc of the first season kicks off with Megatron attempting to form a truce with the Maximals when it becomes apparent that the Vok are a much greater threat to both of them than each other.
In season two, when an alien ship appears that put Tigatron and Airazor on a long bus ride, the two factions team up to try to break into it, but all bets are off when Megatron gets control of the ship and all its power. Though Tarantulas does team up with the maximals in order to prevent Megatron from using the Vok technology to leave Earth.
Beast Wars also had Dinobot's alliance with the maximals, at least as far as he was concerned. Optimus considered him a welcome member of the team.
Dinobot: I am Predacon, despite our alliance. When we return to Cybertron, my fate will be the same as Megatron's. Perhaps even worse.
Optimus: I won't let that happen. You're a Maximal now.
Dinobot: What makes you think I want to be?
Transformers Armada is technically an anime, but whatever. In any case, its very title refers to the Autobot-Decepticon alliance formed in the final episodes to combat Unicron.
Transformers Prime. The Autobots temporarily team up with Megatron to stop Unicron from awakening.
The Wild West C.O.W.-Boys of Moo Mesa episode "Dances with Bulls" had the C.O.W.-Boys' leader Marshal Moo Montana and the series' main antagonist Sherrif Terrorbull team up to track down the Gila Hooligans.
Winx Club got in on this as well. Season 1 saw the Cloud Tower student witches moving in with the fairies at Alfea to fight the Trix, and one of the major complaints about this arc is that they're nowhere to be seen during the battles. Season 2 features this trope again at CT, and although Musa and Layla are briefly shown fighting the Trix together with the student witches, they're again nowhere to be seen afterwards. Although the events of S1 haven't been completely forgotten by the time of the S2 arc note in the original at least, as the Winx specifically mention this while heading to CT, the witches still dread teaming up with the fairies.
In the W.I.T.C.H. season two episode "W is for Witch", Will decides to recruit season one Big Bad Prince Phobos and his crony Cedric in subduing Nerissa. The end result? The start of a Gambit Pileup that doesn't end until the series finale!
The 90s X-Men animated series did this with every appearance of Magneto after his introduction. Every.Single.Appearance. Except for one time when he helped Apocalypse capture a psychic-empowered mutant for his master plan. It got to the point where, during the Grand Finale, he was considered an honorary X-Man, and shown as part of the team in the final shot of the series.
In the X-Men: Evolution episode "Survival of the Fittest" they worked with the Brotherhood to stop The Juggernaut. Then at the end of season 2 the X-Men and Brotherhood teamed up against first Magneto's team and then the Sentinel. The arc plot for season 3 involved everyone trying to stop the unsealing of Apocalypse, and season 4 ended with Apocalypse and his four mind-controlled Horsemen against the X-Men, the Brotherhood, Magneto's team, and the now-SHIELD-controlled Sentinels.
One episode has the Card-Carrying Villain Jack Spicer save the Xiaolin monks from the re-humanized evil sorceress Wuya. He then explains that he's willing to provide any help they need in order to defeat Wuya, since he sees her as a threat to his own plans of world domination.
In the episode "Dangerous Minds" of season 2, Jack ends up accidentally freeing ancient spider creatures that are described as "neither good nor evil, they are simply consumers". They will literally eat everything, the world itself until there is nothing left. The villains don't like this as they want to rule the world not destroy it. Omi and Chase Young team up to stop the spiders and save the world. Chase even uses this as part of his plan to convince Omi to join his side.