Be aware, "Shooting an Elephant" was first published in 1936, roughly a decade after Orwell returned to England, giving up his post as a colonial police officer. This means, first of all, that there is a ruminative quality to "Shooting an Elephant," derived from a place of narrative distance, as Orwell (or his narrator) thinks back on his experiences as an agent of Empire, examining the meanings and motivations behind those experiences and interactions.
First of all, note that Orwell himself emerges as a critic of Empire, somewhat who deeply loathed his time as a colonial police officer (even as he, at the same time, detested the Native people with whom he interacted and who detested him in turn).
In Orwell's view, the lived experience of the Empire proves morally corrosive to the imperialists themselves, forcing them to twist themselves to fit with the expectations imposed on them by the imperial system. The truth of the situation is that Orwell did not have any desire to shoot the animal, nor did he observe the necessity of such an action. Instead, in Orwell's explanation, it was the crowd itself, which expected the colonial agent to kill the animal, that compelled him to act accordingly. His own wishes and judgment were rendered irrelevant as he was forced to adhere to those expectations.