Doing good deeds brings merit, while taking life is undoubtedly committing evil.
Even if Yu Yuan kills a great villain who does no good, it does not change the fact that he is doing evil.
Because harboring good intentions while committing evil acts is still doing evil!
Committing evil will reduce one's merit, and once all merit is depleted, one will accumulate karmic force.
This is also one of the reasons why Daoist Cicada previously did only half of the good deed, and did not completely exterminate the disciples of the Fiery Sun Sect.
But Yu Yuan is different.
His main goal in this endeavor is to commit evil.
Of course, he is not utterly devoid of conscience.
That would not align with his moral compass.
What he seeks are hypocrites like Daoist Cicada who have the "intention to do good", to stop them from doing good deeds; and then find great villains like the disciples of the Fiery Sun Sect, who commit unrestrained evil, to fight evil with evil!