That villain was threatening the townspeople.
彼は小説の中で悪漢を演じるのが好きだ。
He likes playing the scoundrel in novels.
悪漢 is a somewhat literary word for a scoundrel or ruffian, similar in toughness to 悪党 but less used in casual speech.
悪漢 is a somewhat literary word for a villainous man, while 悪人 is the plain, unmarked term usable for anyone.
picaresque novel
Compound of 悪 (aku, 'bad') and 漢 (kan, 'man'). The exact historical derivation is uncertain, but the spelling is conventionally associated with the meaning of a villainous man.