“Shooting an Elephant” is set in the city of Moulmein, Burma (today referred to as Mawlamyine, Myanmar) in the 1920s. At this point in history, Burma was under the control of the British Empire. Orwell was one of many White British men who served as police officers in Burma, forcing British colonial rule on the exploited native Burmese population.
The following passage—which comes as Orwell is, as part of his police work, trying to track down a rampaging elephant—captures several important elements of the setting:
The Burmese sub-inspector and some Indian constables were waiting for me in the quarter where the elephant had been seen. It was a very poor quarter, a labyrinth of squalid bamboo huts, thatched with palmleaf, winding all over a steep hillside. I remember that it was a cloudy, stuffy morning at the beginning of the rains.
Here Orwell alludes to the fact that there was a racial hierarchy in Burma at the time—as a White British officer, he is at the top, followed by the Indian and Burmese constables and sub-inspectors (who wait for him to arrive before taking action). Orwell also notes that he finds himself in the “very poor quarter” of Moulmein, describing the “squalid bamboo huts, thatched with palmleaf” that make up the area. This condescending way of viewing native homes and communities was quite common amongst White British people in Asia at the time.
Orwell's description of the setting in this passage is important not just for historical context but also for narrative momentum. His decision to note that “it was a cloudy, stuffy morning at the beginning of the rains” suggests that there is a buildup of tension that will eventually need to have a rain-like sort of release (as happens later in the story with the elephant’s death).