A samurai-for-hire sets the warring factions of a Japanese town against each other.
With the fall in the 19th century of Japan's feudal lords, samurai suddenly find that their services are no longer in demand. One of their number, unemployed Sanjuro, arrives in a village. Upon learning that the village is divided into two warring camps (one led by merchant Tazaemon and his henchman Seibei, the other by Tokuemon and his cohort Ushitora), Sanjuro calmly surveys the situation and concludes that neither side is worth defending. He needs money for food and lodging, however, and he considers Seibei's offer of 50 ryo to be his yojimbo (bodyguard). He turns down the offer, though, when he learns that Seibei intends to kill him after a battle they are planning, and instead Sanjuro tries to cause the two factions to destroy each other. The situation becomes more volatile when Unosuke (Ushitora's younger brother) arrives with a pistol, the only gun in town. Pretending to ally himself with Unosuke, Sanjuro secretly kills several of his men while helping a ravaged farmer, Kohei, to escape. Unosuke learns of Sanjuro's betrayal and has him captured and beaten. Gonji, the local innkeeper and sake seller, helps Sanjuro escape to a hut on the outskirts of town. Learning that Gonji has been captured, Sanjuro returns to town and finds the two factions burning homes and killing each other. In a duel with the armed Unosuke, Sanjuro prevails, and goes on to kill the rest of his enemies. After contemplating the piles of corpses strewn about, Sanjuro bids goodby to Gonji and the coffin maker and leaves town.