Murdering someone on the street because he detects as evil is still murder, and it's still an evil action. At best, it's a neutral action, because you're still using an evil means to do something good.
If killing an unarmed thing is murder, one could argue that's just tactics. You always want to catch your enemy at their weakest, like launching a fireball into the sleeping orcs camp before attacking.
At the simplest, murder is killing somebody. At a more complex level, there are a bunch of social/legal expectations.
Probably the key difference between justified homicide and murder is whether there is a societal/legal acceptance of the act.
killing enemy combatants (enemy soldiers, orcs) is OK
killing in self defense of self/another during an active crime is OK
killing a non-hostile citizen of the town without a warrant, not OK
having a warrant would mean that the legal system as declared him an enemy combatant
not having a warrant means the PC has no proof that the victim is guilty/evil of anything. Just because you SAY you cast Detect Evil, doesn't mean anything.
in the same way, self-defense relies on the fact that killing the guy during the crime is pretty obvious that he is guilty with minimal risk of mistaken identity.
I tend to see the laws of D&D land being pretty open and wild-westish. Namely to allow for Good PCs doing what they do, without making it too lawyery or nitpicky.