The film opens on a woodcutter (木樵り; Kikori, played by Takashi Shimura) and a priest (旅法師; Tabi Hōshi, Minoru Chiaki) sitting beneath the Rajōmon city gate to stay dry in a downpour. A commoner (Kichijiro Ueda) joins them and they tell him that they have witnessed a disturbing story, which they then begin recounting to him. The woodcutter claims he found the body of a murdered samurai three days earlier while looking for wood in the forest; upon discovering the body, he says, he fled in a panic to notify the authorities. The priest says that he saw the samurai with his wife traveling the same day the murder happened. Both men were then summoned to testify in court, where they met the captured bandit Tajōmaru (多襄丸), who claimed responsibility for killing the samurai and raping his wife.
The bandit's story
Tajōmaru (Toshiro Mifune), a notorious brigand, claims that he tricked the samurai to step off the mountain trail with him and look at a cache of ancient swords he discovered. In the grove he tied the samurai to a tree, then brought the samurai's wife there. She initially tried to defend herself with a dagger, but was eventually "seduced" by the bandit. The woman, filled with shame, then begged him to duel to the death with her husband, to save her from the guilt and shame of having two men know her dishonor. Tajōmaru honorably set the samurai free and dueled with him. In Tajōmaru's recollection they fought skillfully and fiercely, but in the end Tajōmaru was the victor and the woman ran away. At the end of the story to the court, he is asked about an expensive dagger owned by the samurai's wife: he says that, in the confusion, he forgot all about it, and that it was foolish of him to leave behind such a valuable object.
The wife's story
The samurai's wife (Machiko Kyō) tells a different story to the court. She says that Tajōmaru left after raping her. She begged her husband to forgive her, but he simply looked at her coldly. She then freed him and begged him to kill her so that she would be at peace. He continued to stare at her with a look of loathing. His expression disturbed her so much that she fainted with dagger in hand. She awoke to find her husband dead with the dagger in his chest. She attempted to kill herself, but failed in all her efforts.
The samurai's story
The court then hears the story of the deceased samurai (Masayuki Mori), told through a medium (巫女; miko, Noriko Honma). The samurai claims that Tajōmaru, after raping his wife, asked her to travel with him. She accepted and asked Tajōmaru to kill her husband so that she would not feel the guilt of belonging to two men. Tajōmaru, shocked by this request, grabbed her, and gave the samurai a choice of letting the woman go or killing her. "For these words alone," the dead samurai recounted, "I was ready to pardon his crime." The woman fled, and Tajōmaru, after attempting to recapture her, gave up and set the samurai free. The samurai then killed himself with his wife's dagger. Later, somebody removed the dagger from his chest.
The woodcutter's story
Back at Rashōmon gate (after the trial), the woodcutter explains to the commoner that all three stories were falsehoods. The woodcutter had actually witnessed the rape and murder, he says, but just did not want to get too involved at the trial. According to the woodcutter's new story, Tajōmaru begged the samurai's wife to marry him, but the woman instead freed her husband. The husband was initially unwilling to fight Tajōmaru, saying he would not risk his life for a spoiled woman, but the woman then criticized both him and Tajōmaru, saying they were not real men and that a real man would fight for a woman's love. She spurred the men to fight one another, but then hid her face in fear once they raised swords; the men, too, were visibly fearful as they began fighting. They began a duel that was much more pitiful than Tajōmaru's account had made it sound, and Tajōmaru ultimately won through a stroke of luck. After some hesitation he killed the samurai, who begged for his life on the ground, and the woman fled in horror. Tajōmaru could not catch her, but took the samurai's sword and left the scene limping.
At the gate, the woodcutter, priest, and commoner are interrupted from their discussion of the woodcutter's account by the sound of a crying baby. They find the baby abandoned in a basket, and the commoner takes a kimono and an amulet that have been left for the baby. The woodcutter reproaches the commoner for stealing from the abandoned baby, but the commoner chastises him. Having deduced that the reason the woodcutter did not speak up at the trial was because he was the one who stole the dagger from the scene of the murder, the commoner mocks him as "a bandit calling another a bandit". The commoner leaves Rashōmon, claiming that all men are motivated only by self-interest.
These deceptions and lies shake the priest's faith in humanity. He is brought back to his senses when the woodcutter reaches for the baby in the priest's arms. The priest is suspicious at first, but the woodcutter explains that he intends to take care of the baby along with his own children, of whom he already has six. This simple revelation recasts the woodcutter's story and the subsequent theft of the dagger in a new light. The priest gives the baby to the woodcutter, saying that the woodcutter has given him reason to continue having hope in humanity. The film closes on the woodcutter, walking home with the baby. The rain has stopped and the clouds have opened revealing the sun in contrast to the beginning where it was overcast.