Then we have to get into a discussion of what is good and evil.
By that definition many things I consider "evil" (I put that in quotes because I don't truly believe in good and evil) can in fact be "good."
Good: Altruism, mercy, compassion, charity, self sacrifice.
Evil: Harming, oppressing and killing others.
The only time a good person harms someone else or takes a life is when there is no other option reasonably open to them to protect their own life or the life of someone else.
Examples include self defence, and military action in a just war against a foreign invader.
Such killings are not good, but also are they not evil.
Some truly Good people take it to the extremes. They give away all their possessions (charity) or take vows of non-violence or conscientious objectors, and dedicate their lives to helping the lives of others etc.
We can see these same moral values being expressed in DnD over the years with Paladins being restricted in what they could own, vows of Poverty and Non violence in the Book of Exhalted deeds, mercy and redemption being key to what it means to be 'Good'. Positive energy 'heals' and negative energy 'harms'.
Evil things OtoH generally just go around harming stuff.
To summarise - Good help (at personal cost) and avoid evil. Evil harm (to gain something) and avoid good.
You can murder someone to protect others for example.
Thats not murder then is it? Not in any legal jurisdiction Im aware of. If the person killed was trying to kill or harm someone else, and the force you used was proportionate, it's not murder or manslaughter.
The killing was justified.