Do Androids Dream of Electric Sheep? takes place in the year 1992 and in later editions the year 2021, (This change counteracts a problem common to near-future stories, where the passage of time overtakes the period in which the story is set; for a list of other works that have fallen prey to this phenomenon, see the List of stories set in a future now past) after World War Terminus and its radioactive fallout have ruined most of Earth. The U.N. encourages emigration to off-world colonies, in hope of preserving the human race from the terminal effects of the fallout. One emigration incentive is giving each emigrant an "andy"—a servant android.
The remaining populace live in cluttered, decaying cities in which radiation poisoning sickens them and damages their genes. Animals are rare, and keeping and owning live animals is an important societal norm and status symbol. But many people turn towards the much cheaper synthetic, or electric, animals to keep up the pretense. Prior to the story's beginning Rick Deckard owned a real sheep, but it died of tetanus, and he replaced it with an electric one.
The story is set in and around the San Francisco Bay Area, one of the last places affected by the radioactive dust, especially on the peninsula to the south. It is monitored daily by meteorologists using the Mongoose weather satellite in Earth orbit. While still relatively habitable, the sandy deserts of Oregon to the north are highly contaminated by radiation. Rick Deckard stays in a building on the east side of the bay with his wife, Iran, who is depressed.
The main Earth religion is Mercerism, in which Empathy Boxes link simultaneous users into a collective consciousness based on the suffering of Wilbur Mercer. In the shared experience of the Empathy Box, Wilbur Mercer takes an endless walk up a mountain while stones are thrown at him, the pain of which all users share. The television appearances of Buster Friendly and his Friendly Friends, broadcast twenty-three hours a day, represent a second religion, designed to undermine Mercerism. Mercerism is ambiguously portrayed in the novel. The androids have radical claims and historical information questioning Mercer, Mercerism, and the Empathy Box. The Empathy box and its creation of a collective empathic experience seem to be at least part of the reason humanity has come to abhor killing. Deckard explicitly states he does not agree with what the Androids are broadcasting about Mercer.
Androids are used only in the off-world colonies—the only colonies mentioned in the book are on Mars, although humans attempted to colonize the star Proxima—yet many escape to Earth, fleeing the psychological isolation and chattel slavery. Although made of biological materials and physically all but indistinguishable from humans, they are considered to be pieces of machinery. Bounty hunters, such as Rick Deckard, hunt and "retire" (kill) fugitive androids passing for humans. Often, the police department will collect and analyze the corpses of suspected "andys" to confirm that they are, in fact, "artificial."
Earlier androids were easier to detect because of their limited intelligence. As android technology improved, bounty hunters had to apply an empathy test—the Voigt-Kampff test—to distinguish humans from androids, by measuring empathetic responses, or lack thereof, from questions designed to evoke an emotional response, often including animal subjects and themes. Because androids are not empathetic, their responses are either absent or feigned and are measurably slower than a human's. The simpler Boneli Test, used by another police department in San Francisco, measures the reflex-arc velocity in the spinal column's upper ganglia, by testing a subject's reaction time to visual stimuli. However, the only way to be sure beyond a shadow of a doubt that an individual is an android is to take a bone marrow sample.