The play begins with a monologue by Wong, the water seller. He explains to the audience that he has heard that a few of the highest-ranking gods are on their way to the city of Setzuan. They have heard the people of the world complaining about life, so they are coming to deal with it. He is waiting at the gate of the city to greet them when they arrive.
Soon, the three gods appear and Wong recognizes them immediately. They say they need to find a place to stay the night and Wong agrees to help them find one. He knocks at the door of the first house they come to, but a voice from inside yells, "No!" This keeps happening at house after house. Wong is embarrassed for the people of Setzuan, so he lies to the gods and makes excuses for the people who are blatantly refusing to give them a place to stay.
Wong walks off, apparently in search of a more welcoming household, and the gods talk about how this has been happening in every city to which they go. They are worried they won't run into a good person anywhere; this would be unfortunate, since they have a resolution that reads, "The world can stay as it is if enough people are found living lives worthy of human beings." They have to count the water seller out as a good person, since the cup he has given them water in has a false bottom.
After being rejected yet another time, Wong tells the gods he'll take them to the house of Shen Te, the prostitute. She leans her head out the window and says she can't take the gods in because she is expecting a customer, but after Wong pleads with her she decides to hide from the customer and then take the gods in. Wong tries to hide Shen Te's profession from the gods, but it's obvious they know what's going on.
While they wait for Shen Te to "tidy up," as Wong says, the gods ask him if people in the world "have a hard time of it." He answers that "the good ones do," and the first god retorts, "What about yourself?" revealing that they know he has cheated them. Wong reveals himself to know his own personality and weaknesses, for he responds, "You mean I'm not good. That's true. And I don't have an easy time either!"
Shen Te comes down to the street, but Wong and she miss each other. The gods realize that Wong has run away in shame. She welcomes them into her house; stage directions indicate that time has passed, and now the gods are leaving Shen Te's house at dawn. They tell her she is clearly a good person, since she gave strangers a room for the night, but she protests that she must have a shameful occupation because she is so poor.
She asks them how to live a good life and still make ends meet, but the gods ignore her questions and try to leave before she can prove to them that she is anything other than good. She complains to them that she cannot afford to live, so after conferring with each other, the gods decide to give her money. They explain they are only paying their "hotel bill," and then they leave.
The theme of Historical Materialism, or the idea that a society’s morality is determined by its economic systems, is introduced in the prologue. When Shen Te complains to the gods, "But everything is so expensive, I don't feel sure I can do it," The second god responds, "That's not our sphere. We never meddle with economics." However, the first god immediately contradicts him and they decide to give her some money to make it easier for her to be good. This irony blurs the distinction between the morality of "goodness" that the gods are searching for and economics.
It is obvious from the prologue that the gods do not adhere to the general understanding of what "gods" should be or represent. They are individuals who bicker with and contradict each other, and in the prologue, they seem to prefer a false sense of goodness over the truth, which is that Shen Te is a prostitute. As she begs with them to believe that it is hard for her to be good, they ignore her at first and try to shut down her misgivings with unsupported reasoning.
The theme of "goodness," which seems so simple in the title, is revealed as multi-faceted right from the beginning of the play. While Wong runs off to find a house that will welcome the gods for the night, the gods confer among themselves about how their mission to find a good person is failing. The second god says, "People just aren't religious anymore, let's face the fact. Our mission has failed!" The third god, reading from the resolution they are trying to follow, defines good people as those "living lives worthy of human beings." This definition is vague, since it is unclear what exactly a human being is worth.
Wong's character is set up as problematic with regard to the definition of "goodness." The third god suggests him as someone who might be "good," but the second god quickly reveals that the bottom of the water cup from which he has been drinking is false, and concludes, "The man is a swindler." This information seems to rule Wong out as a candidate for goodness in the minds of the gods, but the line is not so clear; he is poor and needs the extra money. Likewise, he is the only one trying to help them find a place to stay, but at the same time, he is lying to them out of embarrassment.
Wong's interaction with Shen Te, in which he convinces her to let the gods stay at her house even though it means hiding from a customer (and thus losing money), introduces her character as someone who cannot say no to anyone, even when it means a personal inconvenience. Wong describes her this way to the gods: "She can't say no."