The art of ruining someone's good name by spreading untruths is defamation.
Sometimes, the things fangirls and badficcers make canon characters say and do can ruin the reputations of those characters. For example, bashing is the purposeful smearing of a character's image... often done simply because the badficcer simply doesn't like a character. On the other hand, many writers achieve this effect unintentionally: with bad story decisions, unfortunate implications, and bad characterization that really should embarrass everyone involved.
Defamation can happen in-fic as mentioned above, or even on a wider scale outside of the fic. A good amount of canon damage occurs when a character is mischaracterized so often that the fandom or outside readers begin to revile or dismiss a character based on the uncanonical, damaging portrayal.
Because fanfiction is written, defamation in fanfic should be considered libel. If such aspersions are spoken, they are slander. Other related words are calumny and vilification. These are similarly bad things. It is not nice to do these.