Biography
Just because the main characters are fighting to oust the Big Bad doesn't mean they're heroes... at least, not all of them.
In a team composed of good members, there will often be one Token Evil Teammate. Narratively, this character can serve as a distinct and amoral foil to his more strait-laced colleagues. If the Heroes start putting Honor Before Reason, the Token Evil will often remind them that sometimes unpleasant methods are needed to save the world. They also provide Your Approval Fills Me with Shame for when the heroes are getting too pragmatic and forget their morals.
These characters are often Played for Laughs as the Heroic Comedic Sociopath. A lot of the humor they provide is of the Crosses the Line Twice variety, doing obscenely wrong things because it's shocking and unexpected, as well as a form of escapism. On the other side of the fence, a very serious character that fills this role might see it as Dirty Business, and do what they have to on behalf of The Team.
Despite the name, the Token Evil Teammate has a lot of leeway as to his Character Alignment. There are many kinds of (the meaner) Anti-Heroes, Anti-Villains and yes, outright villains who can fill this role. Regardless of character type, the mainstays of this role are usually: snarkiness, jerkiness, violence, and a tendency to become the Butt-Monkey for their behavior. It should also be mentioned that "treachery" was not on that list. The thing with the Token Evil Teammate is that evil does not mean incapable of friendship. While they are usually out for themselves first, they will often have reasons to stay loyal to their team as a whole, or at least individual members.
Sometimes they'll (very) begrudgingly admit that they like their teammates, or at least find them less intolerable than they say, and frequently they find their association either lucrative, entertaining, or even enjoyable. If it's pointed out by somebody that they're not as bad as they make themselves out to be though, they'll generally tell them to shut up, or to take it back. For extra points, this can be done in either a very cold, aloof or very rude and loud way.
If they do betray their teammates, expect The Captain to tighten the Morality Chain or Restraining Bolt and use various threats like Death Glares to bring them back in line. Why don't they kill him or at least kick him out? Because sometimes you just need the firepower, and they can "do more good than malice" (or at least less harm) on the good guys' side than dead or cut loose. Kind of like controlling a brush fire to good ends.
Some variations include:
They're Only in It for the Money. Or the opportunity to loot, pillage, and plunder. Bribes and financially based threats keep them in line.
Psycho Sidekick: They have a mutual friendship, or family relationship, with one of the heroes which survives despite their evil orientation. But don't expect them to be helpful for anybody else. Sometimes, the friendship is established during the show, at which point the purely money-hungry evil teammate will "tip his hand" and save his friend rather than get the idol.
The evil friend is actually The Starscream and is simply using the heroes as a way to topple the existing Big Bad.
The Psycho Supporter is the Well-Intentioned Extremist of the party, willing to do anything for his buddy's ideals.
They were recruited because they have skills, cunning, and general attitude that the heroes know will be useful, even if they hate having them around.
They have an ulterior motive for joining the heroes, and the heroes' plans will further their own agenda. This may be as simple as a group of rebels fleeing the Evil Empire being joined by a guy who is trying to escape a punishment that he actually deserved. It depends on the heroes' luck if this guy doesn't turn out to be a Wild Card.
They have a grudge against the Big Bad, or they may want to put a stop to them because Even Evil Has Standards. Either way, they want the Big Bad to be taken out, and helping the good guys is the best way to ensure that happens.
They're just in it For the Evulz. The hero is on an exciting, heroic quest that will save the world, but it also involves a lot of killing mooks, and they've got nothing better to do right now. They want to cause chaos and rain down carnage, and this is the best way to sate their bloodlust.
Alternatively they are a type of Blood Knight or Psycho for Hire and joining the heroes allows them to turn their violence towards the heroes' enemies rather than innocents.
On rare occasions, Who Watches the Watchmen? In a setting where a Balance Between Good and Evil matters, or just any setting with Grey-and-Gray Morality, having somebody on your team with some shaky morality can help keep things in perspective. See Your Approval Fills Me with Shame, and Even Evil Has Standards.
The evil member is a captured former enemy the heroes consider too dangerous to be left unsupervised, but too useful or important to be killed so they add them to the team (often with insurance) to keep an eye on them.
They are former villains whose code of honor keeps them on the heroes' side for one reason or another, but does not extend to any other traditionally "good" behaviors.
Compare Enemy Mine, for when the alliance with the evil/antagonistic character is less permanent. When you've got an evil person using a traditionally heroic role to cover up his behind-the-scenes evil, you have an Evil Hero on your hands. Contrast Big Bad Friend for where the teammate's evil nature is a shock revelation. For the inverse, see Token Good Teammate. May or may not also be Affably Evil. Usually, but not always, a Nominal Hero. They often qualify as The Friend Nobody Likes.