George Orwell writes about his own experience in "Shooting an Elephant," and the first line of the essay sets the tone for everything that follows. He says, "I was hated by large numbers of people." In that environment, it would be difficult to make a good choice, or at least a choice that is likely to suit everyone; nevertheless, he is a member of the police force and should have made a different decision.
As part of the Imperial Police, Orwell was called in and given a rifle when a trained elephant got loose and began a bit of a rampage. It is true that there was damage and a man was even killed; despite that, there is no compelling reason why the animal should have been killed after the fact.
First, he instinctively knew he should not do it. In matters of life or death, this is something which should be considered if you have time to deliberate.
As soon as I saw the elephant I knew with perfect certainty that I ought not to shoot him. It is a serious matter to shoot a working elephant – it is comparable to destroying a huge and costly piece of machinery – and obviously one ought not to do it if it can possibly be avoided.
Second, as mentioned in the quote above, elephants represent a man's livelihood, and killing the elephant means losing that ability. The animal certainly would be more valuable to the man alive than dead.
Third, the elephant was no longer a threat to anyone. It was a tame elephant which managed to break away from his chains in the midst of his "must" (which is something like a female animal being in heat).
[A]t that distance, peacefully eating, the elephant looked no more dangerous than a cow. I thought then and I think now that his attack of "must" was already passing off; in which case he would merely wander harmlessly about until the mahout came back and caught him.
Finally, Orwell believes that killing this animal would be committing murder. As he watches the elephant calmly eating, he is convinced "that it would be murder to shoot him."
In the end, though, he succumbed to that pressure, that palpable hatred he felt from "large numbers of people." The elephant had done its worst and was no longer a danger to anyone, yet Orwell shot it merely because he felt pressured into doing so. That is not an acceptable reason to commit murder.