Sixteenth-century Japan. Times are bad, with a weak shogun running things and the lords under him taking advantage of the opportunity to settle old scores. Wandering ronin—masterless samurai—crowd the streets looking for work, and criminals are free to prey on the weak and helpless.
One particular village full of said weak and helpless endures terrible suffering at the hands of the local riffraff. But rather than lay down for it, they decide to take action: going out and hiring a bunch of samurai to protect them. How are they going to pay for said protection? Find samurai desperate enough to work for food! Turns out, they're more common than you'd think, and the peasants soon land themselves a reliable protector in the form of Kambei Shimada (Takashi Shimura).
Under his guidance, they find six more samurai to help them out: Kambei's old buddy Shichiroji (Daisuke Kato); ready and rarin' to go; Gorobei (Yoshio Inaba); master of woodchop Fu Heihachi (Minoru Chiaki); young and enthusiastic Katsushiro (Ko Kimura); silent-but-deadly Kyuzo (Seiji Miyaguchi); and Kikuchiyo (Toshiro Mifune), the orphaned son of farmers who has decided to "pass" as a samurai.
Together, they journey to the village, where the locals treat them like poisonous toads. Despite the deep and abiding gaps of mistrust, the seven gradually win over their hosts, as well as training them for the battle to come. Along the way, Katsushiro falls for one of the local peasant girls (Keiko Tsushima), in a move that certainly won't end in tears and hurt feelings for all concerned.
The first skirmishes go well, as the village kills two bandit scouts and capture a third (and tear him apart despite Kambei's deep-set disapproval) and a raid on the bandits' fortress leave it burning merrily to the ground. They suffer loses themselves, however: Heihachi is killed at the fortress, and a subsequent attack claims more of their number. The bandits have guns—only three, but enough to make their lives very difficult—prompting Kyuzo to steal one from their camp and Kikuchiyo to follow suit (in his own unique is-he-drunk-or-what style).
Subsequent raids winnow the bandits' ranks further, as Kambei lures a few of them in at a time, and then cuts them off from their supporters. It works, but Kikuchiyo's little stunt with the gun leaves a key defense unmanned, and the results cost them several farmers and Gorobei.
That night, Kambei tells them to get ready for a big throw-down in the morning. The peasant girl's dad shows up and throws a major hissy fit in front of the whole town. They gradually talk him down though, and the rest of the village gets ready to rumble.
Said rumble arrives in the middle of a pouring rainstorm because apparently it just wasn't miserable enough out there. The samurai emerge victorious, but two more of their number are killed: Kyuzo by a gunshot wound and Kikuchiyo by, um, another gunshot wound. But before he goes, Kikuchiyo performs a truly miraculous feat by killing the bandit chief.
So it's all smiles in the village afterwards, as they dance and sing while planting their crops. The three surviving samurai are a little more with the sad face, however: Katsushiro because he can't be with the woman he loves, and the other two because they again have survived to watch a bunch of buddies die. As they look at the four freshly dug graves, Kambei notes that the farmers were the real winners, not them. (Hey, it's a foreign movie: even the happy endings are kind of sad.)