Designated Evil/Sandbox

Designated Evil is when a "good guy" performs an act that's evil in and of itself but was necessary or pragmatic within the circumstances given, yet the author portrays it as unambiguously evil, possibly even a crossing of the Moral Event Horizon or at the very least a slide toward the dark side. The author doesn't bother to sufficiently elaborate on any other viable options the hero could have taken to deal with the problem faced; they just decide that the hero's actions were wrong.

Violating Thou Shalt Not Kill is one of the most well-known forms of this; however, this can often be seen as a case of Shooting The Dog -- the character in question may have just done what they had to. Expect everyone else to ask "What the Hell, Hero?" anyway. Even if the character regards their actions as Dirty Business and laments the necessity of it, other characters may still act like they did it For the Evulz. There are several ways that this can be handled. The character may come to agree with everyone else and regret his actions, he may decide to call them out and explain why his actions are justified, or he may just decide that since he's already done one morally questionable thing he might as well stop trying to be good at all. Whatever the reaction, it's a good way to hammer home An Aesop.

Compare Designated Villain, which concerns the morality of a character rather than a single act. Contrast Protagonist-Centered Morality, where everything the hero does is treated as good because they're the hero.