Seven Samurai begins with a group of bandits scouting a farming village. They make the decision to come back when the barley is ripe in order to steal their food and anything else they want (likely including women). One of the farmers has overheard the men and informs the villagers of the threat. They take the news to the village elder who tells them to find four samurai to protect the village. Four farmers head into the nearest big town and seek the assistance of the samurai, but struggle to find samurai that will work for food alone, without promise of reward or title. The only samurai that seems interested is one who is starving and weak, and a poor fighter.
They eventually stumble upon a samurai named Kambei, who is introduced while cutting his top knot in order to pose as a priest to save a small child from a bandit. He is more concerned with doing good deeds than with social hierarchies or superficial ideas of honor. He agrees to protect their village in exchange for food alone, but says they will need seven samurai in total. A search begins, and Kambei gradually collects a rag-tag band of samurai willing to help, with similar ideas about morality and the real meaning of honor. We are introduced to these samurai, their personality traits and their sense of morality, at length: Gorobei has a similar world-view to Kambei, displaying compassion toward others; Heihachi is charismatic and witty to make up for mediocre swordsmanship; Shichiroji is friendly but serious, and is an old friend of Kambei’s; Kyuzo is a master swordsman, constantly trying to test the limits of his skill, as well as reserved and quiet; and Katsushiro is a young eager apprentice, immature and inexperienced, but compassionate and protective of the weak. Kambei is prepared to leave with this group of six samurai in total, when Kikuchiyo drunkenly comes to their inn and asks to join. He is arrogant, obsessed with birth-status, and rude, and the other samurai do not want him to join. He and Kambei have already met, when Kambei insulted him after he tried to challenge Kambei out of pride. It will later turn out that he was born a farmer, which in part explains why he has such a chip on his shoulder.
With the team formed, they make their way to the village. Kikuchiyo follows them even though they have told him not to come. At the village, the farmers are scared of them and hide because one villager has stoked fears that the samurai will take advantage of the village women. Kikuchiyo becomes the bridge between the two social classes, as he was born a peasant and has now taken the identity of a samurai. He’s able to see the good and bad in both the farmers and the samurai, and in an outburst over a dispute about armor the farmers stole from defeated samurai that they murdered, he reveals to the samurai the way their class have oppressed farmers for centuries. He also reveals in this scene that he was born a farmer. Now that the truth is known, the two groups can come together and begin to prepare for the bandits.
Kambei directs the samurai to train the villagers with spears as he sets plans to fortify the village. He has the villagers flood the fields outside the village after the barley is harvested, remove a bridge, and build massive fences so that the bandits can only enter one way into the village. During this time Katsushirō, the young apprentice to Kambei, falls in love with a female villager named Shino, whose father, Manzo, had set off the first panic among the villagers by forcibly cutting her hair. He wanted her to appear like a boy so that the samurai would not be attracted to her, but Katsushiro realizes she is a woman when he comes upon her in the forest, wrestles her, and accidentally sees under her shirt. He courts her slowly and cautiously, and the two nearly sleep together at Shino’s urging, but they are interrupted by the arrival of bandit scouts. Kikuchiyo and Katsushirō go with Kyūzō to kill the men before they return the information to their leader. Next, three samurai go to the bandit’s fort and burn it down, and are able to kill several of the bandits. One of the farmers, Rikichi, has come with the samurai to lead them to the bandit hideout. He sees his kidnapped wife emerge from the bandit hideout, but when she sees her husband she runs back into the burning building to her death. While Rikichi attempts to follow her into the burning building, Heihachi holds him back and is shot, then dies a few minutes later.
Shortly after Heihachi’s funeral, the bandits arrive to attack the village. They are held back by the flooded fields and fences, but they burn down the houses and mill across the stream, killing the village elder and a young couple. This orphans the young couple’s baby, with whom Kikuchiyo identifies, revealing that he was orphaned as a child. The bandits are still unable to enter, however, and the samurai and villagers are able to pick several off one by one over the course of the night as they try to sneak in through different sides of the village. In the middle of the night, Kyuzo rushes into the woods, kills two bandits, and is able to steal one of their muskets. The next morning, the villagers allow the bandits on horseback into the village one or two at a time, and overwhelm them inside the village. During a break in attacks while the bandits regroup, Katsushiro sits with Kikuchiyo at his post and tells him how much he admires Kyuzo’s bravery. Kikuchiyo decides to try to achieve this glory for himself, and abandons his post to try to steal a musket, thinking that the bandits will not attack his well-protected side of the village. He successfully steals a musket, but just after he returns it turns out that several bandits did overwhelm his post and kill two villagers, and a larger attack ensues.
During this fight Gorobei and Yohei are killed. Gorobei was second in command to Kambei and his loss is deeply felt by both the villagers and the samurai. Kikuchiyo had grown fond of Yohei and feels responsible for his death. Night falls once more and Kambei decides that the next battle will be the last stand. He anticipates the bandits will come in the morning and tells the men to sleep, visit their families, and prepare for a large fight. Katsushirō walks through the village to get sleep but finds Shino waiting for him and they sleep together in a barn. Her father finds them and beats her until Kambei finally stops him.
The final battle begins the next morning in a downpour of rain. The remaining bandits charge in on horseback and the villagers try to separate them from each other and overwhelm them. Kikuchiyo fights with particular aggression, having lost many that he cared about and hoping to redeem his earlier actions. Losing men, the bandits seem on the verge of defeat. The leader makes his way into a house full of village women to shoot at the samurai from cover. He kills Kyuzo with a musket shot, enraging Katsushiro who begins to charge the house until Kikuchiyo stops him and goes himself. Kikuchiyo is shot on his way in, but gets to his feet and drives his sword through the leader, killing him and ending the battle as he dies himself.
In the next scene, we see the farmers planting their next crop of rice as they play music and sing joyously. We see that the four samurai who lost their lives are buried on the hill near the town with their swords coming from their graves. Only Kambei, Shichiroji, and Katushiro survive. Shino passes Katsushirō and they stare at each other for a moment before she returns to her farmwork. The relationship between these remaining samurai and the farmers has come to an end. At the end of the film, Kambei looks sorrowfully at the graves and says that the victory belongs to the farmers, but not to the samurai.