The story of Dogville is told in nine chapters and a prologue, with a one-sentence description of each chapter given in the film, in the vein of such chapter headings in many 19th-century novels. These descriptions are given below.

Which introduces us to the town and its residents
Dogville is a very small American town by an abandoned silver mine in the Rocky Mountains, with a road leading up to it and nowhere else to go but the mountains. The film begins with a prologue in which a dozen or so of the fifteen citizens are introduced. They are portrayed as lovable, good people with small flaws which are easy to forgive.

The town is seen from the point of view of Tom Edison Jr., an aspiring writer who procrastinates by trying to get his fellow citizens together for regular meetings on the subject of “moral rearmament”. It is clear that Tom wants to succeed his aging father, a physician, as the moral and spiritual leader of the town.

Chapter 1
In which Tom hears gunfire and meets Grace
It is Tom who first meets Grace Mulligan, who is on the run from gangsters who presumably shot at her. Grace wishes to keep running, but Tom assures her that the mountains ahead are too difficult to pass. As they talk, the gangsters approach the town, and Tom quickly hides Grace in the nearby mine. One of the gangsters asks Tom if he has seen the woman, which he denies. The gangster then offers him a reward and hands him a card with a phone number to call in case Grace shows up.

Tom decides to use Grace as an “illustration” in his next meeting—a way for the townspeople to prove that they are indeed committed to community values, can receive a gift, and are willing to help the stranger. They remain skeptical, so Tom proposes that Grace should be given a chance to prove that she is a good person. Grace is accepted for two weeks in which, as Tom explains to her after the meeting, she must gain the friendship and trust of the townspeople.

Chapter 2
In which Grace follows Tom’s plan and embarks upon physical labor
On Tom’s suggestion, Grace offers to do chores for the citizens—talking to the lonely, blind Jack McKay, helping to run the small shop, looking after the children of Chuck and Vera, and so forth. After some initial reluctance, the people accept her help in doing those chores that “nobody really needs” but which nevertheless make their lives easier. As a result, she becomes an accepted part of the community.

Chapter 3
In which Grace indulges in a shady piece of provocation.
In tacit agreement Grace is expected to continue her chores, which she does gladly, and is even paid small wages which she saves up to purchase a set of seven expensive porcelain figurines, one at a time, from Ma Ginger’s shop. Grace begins to make friends, including Jack, who pretends that he is not blind. She earns his respect upon tricking him into admitting that he is blind. Once the two weeks are over, everyone votes at the town meeting that Grace should be allowed to stay.

Chapter 4
Happy times in Dogville
Things go well in Dogville until the police arrive to place a “Missing” poster featuring Grace’s picture and name on the mission house. With the townspeople divided as to whether they should cooperate with the police, the mood of the community darkens somewhat.

Chapter 5
Fourth of July after all
Still, things continue as usual until the 4th of July celebrations. After Tom awkwardly admits his love to Grace which she reciprocates and the whole town expresses their agreement that it has become a better place thanks to her, the police arrive again to replace the “Missing” poster with a “Wanted” poster. Grace is now wanted for participation in a bank robbery. Everyone agrees that she must be innocent, since at the time the robbery took place, she was doing chores for the townspeople every day.

Nevertheless, Tom argues that because of the increased risk to the town now that they are harboring someone who is wanted as a criminal, Grace should provide a quid pro quo and do more chores for the townspeople within the same time, for less pay. At this point, what was previously a voluntary arrangement takes on a slightly coercive nature as Grace is clearly uncomfortable with the idea. Still, being very amenable and wanting to please Tom, Grace agrees.

Chapter 6
In which Dogville bares its teeth
At this point the situation worsens, as with her additional workload, Grace inevitably makes mistakes, and the people she works for seem to be equally irritated by the new schedule—and take it out on Grace. The situation slowly escalates, with the male citizens making small advances to Grace and the females becoming increasingly critical and abusive. Even the children are perverse: Jason, the 10-year-old son of Chuck and Vera, asks Grace to spank him, until she finally complies after much provocation (von Trier has noted that this is the first point in the film where it is clear how completely Grace’s lack of social status and choices makes her vulnerable to other people manipulating her). The hostility towards Grace finally reaches a turning point as well when Chuck rapes her in his home.

Chapter 7
In which Grace finally gets enough of Dogville, leaves the town, and again sees the light of day.
That evening, Grace tells Tom what happened and he starts to form a plan for her escape. The next day, Vera confronts Grace for spanking her son Jason and Liz informs her that a few people saw Tom leave her shack very late the night before, casting suspicions on her virtue. The next evening she is confronted again by Vera, Liz and Martha in her shack. Martha witnessed a sexual encounter between Chuck and her in the apple orchard. Vera blames her for seducing her husband and decides to punish Grace by destroying the figurines. Grace begs her to spare them and tries to remind Vera of all the good things she has done for her including teaching her children the philosophy of stoicism. Vera cruelly uses it against her while destroying the figurines she worked hard for, claiming that she will stop smashing them if Grace refrains from crying. Grace goes to Tom that evening and they decide to bribe the freight truck driver Ben to smuggle her out of town in his truck. En route, she is raped by Ben, after which he returns Grace to Dogville.

The town agrees that they must not let her escape again. The money paid to Ben to help Grace escape had been stolen by Tom from his father—but when Grace is blamed for the theft, Tom refuses to admit he did it because, as he explains, this is the only way he can still protect Grace without people getting suspicious. So Grace finally becomes a slave: she is chained, repeatedly raped, and abused by the people of the town. She is also humiliated by the children who ring the church bell every time she is violated, much to Tom’s disgust.

Chapter 8
In which there is a meeting where the truth is told and Tom leaves (only to return later).
This culminates in a late night general assembly in which Grace—following Tom’s suggestion—relates calmly all that she has endured from everyone in town, then heads back to her shack. Embarrassed and in complete denial, the townspeople finally decide to turn her over to the mobsters-assuming that Grace will be executed. As Tom tells Grace this, declaring his allegiance to her over the town, he attempts to make love to her. Still chained, she responds to his advances by saying “…it would be so beautiful, but from the point of view of our love so completely wrong. We were to meet in freedom.” She questions if thoughts of using force against her are in fact why he is so upset, noting that he could have her if he wants—all he needs to do is threaten her to get his way, as the others have done. Tom defends his intentions as pure, but upon reflection realizes that what she says is true. Shaken by self-doubt, he decides it would jeopardize his career as a philosopher if this doubt were allowed to grow. To rid himself of its source, he decides to personally call the mobsters and turn Grace over.

Chapter 9 and ending
In which Dogville receives the long-awaited visit and the film ends
When the mobsters finally arrive, they are welcomed cordially by Tom and an impromptu committee of other townspeople. Grace is then freed by the indignant henchmen, and her true identity is revealed: she is the daughter of a powerful gang leader who ran away because she could not stand his dirty work. Her father motions her into his Cadillac and argues with her about issues of morality. After some introspection, Grace reverses herself and comes to the conclusion that Dogville’s crimes cannot be excused due to the difficulty of their circumstances. Tom, who has become aware that the mobsters pose a threat to himself and the town, is momentarily remorseful, but rapidly descends into rationalization for his actions. Grace sadly returns to her father’s car, accepts his power, and uses it to command that Dogville be removed from the earth.

Grace tells the gangsters to make Vera watch her children die, one by one, as punishment for destroying her figurines. She instructs them only to stop killing the children if Vera can refrain from crying, stating that she “owes her that”. Dogville is burned to the ground and all of its inhabitants brutally massacred with the exception of Tom, whom she executes personally with a revolver right after he applauds the effectiveness of her use of illustration as an attempt to get her to spare him. After the massacre, the gangsters hear a barking sound from one of the houses. It is the dog Moses. A gangster aims a gun at the dog, but Grace commands that he should live: “He’s just angry because I once took his bone.” The chalk drawing of Moses becomes a real dog as his barks lead into the credits.