The converse of an anti-hero (i.e., a protagonist who isn't purely good or heroic), an anti-villain is an antagonist who isn't purely evil nor entirely unsympathetic -- a character who doesn't seem to deserve being cast as the villain, perhaps cast arbitrarily as the villain because they are not the focus of the story but merely present a foil to the central figure, who may be an antihero protagonist. Cf. scapegoat.
Magneto was an antivillain because, while the X-Men were the protagonists who fought to defeat him and prevailed in the end, we can still respect and appreciate him for his motives and principles, however ill-considered his ruthless methods.
by Monseignore Laszlo August 31, 2006
An antivillain is the opposite of an antihero. It's someone who, in a story, is trying to do the right thing but ends up impeding the protagonists. It could be someone who believes the villain is a good person and so helps them, someone who believes in misguided ideals, or someone who mistakes the hero for a villain.
"Draco Malfoy wasn't really evil, he was an antivillain because he was only following what he was taught to do."
by Quartia January 22, 2020