Grusha has returned to the city where she is about to face a trial for having taken the Governor's son. The Cook from the first act tells her that she is lucky that Azdak is the judge, since that means she will have a chance at winning the case. Simon is also present, and he tells Grusha that he will swear he is the child's father. The Ironshirts are still present and one of them recognizes Grusha. It is the corporal she hit with a piece of firewood. He leaves cursing, afraid to say anything because then he would have to admit that he wanted to kill the child.
The Governor's wife, Natella, arrives and comments on how much she hates the smell of the common people. Her lawyers advise her to not say anything against the poor until they are certain that the Grand Duke has appointed a new judge. Azdak is then led onstage in chains, having been arrested because he worked for the Fat Prince. The soldiers rip off his gown and start to beat him. The Governor's wife claps her hands while this occurs.
Suddenly a messenger arrives with news from the Grand Duke. The Grand Duke appoints Azdak to be the new judge. This is done to pay off his debt to Azdak for having saved his life. Azdak is immediately put back into his judicial position and the soldiers stop beating him. He gets up and gets ready to judge the case.
He starts the case by taking a bribe from the prosecutors, who are working for Natella. They explain that Grusha has stolen Natella's child and refuses to hand it over. Grusha claims that Michael is her child and that she brought him up. The lawyers point out that Grusha does not claim to be a blood relative of Michael's. One of the lawyers then also adds that Natella needs to get Michael back in order to take over the Governor's former estates.
Azdak questions Grusha and discovers that she was forced to marry to protect Michael. He also learns that she and Simon are in love, even though Simon is not her husband. Both Grusha and Simon get mad at Azdak because they think that he has already decided in Natella's favor. Simon starts quoting folk wisdom to Azdak, who finally fines Simon indecent language. Grusha then accuses Azdak of taking bribes and calls him a "drunken onion." Azdak fines her thirty piasters for her rudeness and moves on to another case.
The other case is that of an old couple who have been married forty years. They claim they always disliked each other and now they want a divorce. Azdak tells them he will think about their request and then returns to Grusha's case. He calls Grusha to him and asks her why she will not give Michael up. He points out that Michael would be very rich since Michael would inherit the estates. Grusha remains silent and Azdak tells her that he understands her.
Michael is brought into the courtroom and Natella accuses Grusha of dressing the child in rags and raising him in a pigsty. Azdak watches as Natella throws herself at Grusha, but is restrained by her lawyers. He then orders Shauwa to take a piece of chalk and draw a circle on the floor. Michael is placed in the middle and both women are ordered to take an arm. Azdak tells them that whichever woman can pull the child out of the circle will get him. Natella pulls hard and yanks the child out of the circle; meanwhile, Grusha has refused to pull. Grusha then apologizes to Azdak for having insulted him earlier.
Azdak orders them to make the test one more time. Again Grusha lets go of the child's arm. Azdak then says that it is now obvious who the true mother is. He gives Michael to Grusha and advises her to leave the city. He then orders Natella to disappear before he fines her for fraud. Michael's estates fall to the city and he decides to have them called Azdak's Garden. His last act is to sign the divorce papers. However, Azdak "mistakenly" divorces Grusha instead of the old couple. Everyone present then starts dancing. During the dancing Azdak slowly is hidden from view until he disappears by the end. The Singer ends the play by describing Azdak's reign as a "brief golden age, / almost an age of justice." He then concludes with the lines, "Children to the motherly, that they prosper, / Carts to good drivers, that they be driven well, / The valley to the waterers, that it yield fruit."
The development of Azdak is completed in this act. His eighth step is his reinstatement as judge by the Grand Duke. Nine is his ruling in favor of Grusha and divorcing her, and his tenth and final step is his disappearance at the end.
There is a strong circularity to the play, with the ending returns to beginning. Thus the last line of the play, "The valley to the waterers, that it yield fruit," is a return to the Prologue where the fruit farmers receive the valley. This circularity, or rather continuity is present in other respects as well. For instance, the Ironshirts are still present in the final act. Brecht is trying to make the audience realize that although the regime may change, the army always stays the same. Thus Grusha sees the Corporal whom she knocked out, and he is still working in the army.
Azdak mimics Christ throughout this final act. He is first shown being beaten and then lying "dead" on the ground. The arrival of the messenger is a form of resurrection for him, and soon thereafter he gets up and puts on his gown again. The final moment of the act is his ascension into heaven, represented by having Azdak simply disappear. His reign on earth is remembered, we are told, as a period of justice, a "brief golden age."
Brecht takes the religious connection even further by having Azdak represent Solomonic wisdom. This story is similar to the story of Solomon where he must choose the real mother of a baby. He says that he will cut the child in half and give each woman one part. The true mother chooses to give the other woman her child. Thus, Solomon knows who the real mother it. The same thing happens here, except that this time it is Grusha who would rather lose the child instead of the real mother. Azdak justifies his decision the same way King Solomon did, by choosing the mother who does not try to harm the child.
Even though Azdak is gone at the end, it is important to notice what he has left behind: Azdak's Garden. This represents a return of the Biblical Garden of Eden. Thus Azdak as a character is actually a spiritual figure; he alone leaves behind a memory of his reign and the justice that it created for the people.