At the pivotal moment just before he kills the elephant, Orwell doesn't want to do it. He sees it standing peacefully, posing no threat to anyone in that moment. Orwell also realizes that a working elephant is worth a lot of money, and the owner isn't nearby. He contemplates the impending shooting with these principles:
And at 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. Moreover, I did not in the least want to shoot him.
Nevertheless, he does shoot the elephant. These are several reasons why:
1. The elephant has killed a man. Witnesses testify that the elephant grabbed the man with its trunk while it stepped on his back and "ground him into the earth." The elephant thus poses a potential threat to other people.
2. As a representative of Britain, Orwell cannot appear cowardly in front of thousands of Burmese people. He knows that they hate him already. The entire crowd wants the "terrorizing" elephant shot, and Orwell is the only one standing among the crowd with a gun. To refuse would be to risk his own safety:
A white man mustn’t be frightened in front of “natives”; and so, in general, he isn’t frightened. The sole thought in my mind was that if anything went wrong those two thousand Burmans would see me pursued, caught, trampled on and reduced to a grinning corpse like that Indian up the hill.
He believes on some level that either he or the elephant (or both) must die, and shooting the elephant satisfies the locals and spares him further persecution.
3. It's simply the law of the land. Local law states that a "mad elephant" must be killed if the owner cannot control it, and since the owner could not be located or reached, the responsibility has fallen to Orwell to carry out the law.