In 1876, a drunk and disillusioned Civil War hero, Captain Nathan Algren, haunted by his role in a massacre of innocent Native Americans, interrupts his performance at a San Francisco sideshow advertising rifles, by hysterically recounting the bloodshed and then shooting above the terrified crowd. After the show, his former commander, the rapacious Colonel Benjamin Bagley, introduces him to Omura, a Japanese businessman bent on making feudal Japan into a modern nation for his own financial gain. Omura offers Algren a lucrative job working with Bagley to mold conscripted farmers into Japan’s first modern army. Realizing his outburst at the sideshow has cost him his job and needing to feed his penchant for alcohol, Algren accepts the offer to work with Bagley and his loyal former sergeant, Zebulon Gant, in Japan, but seethes with rage against Bagley for having ordered Algren to slaughter innocent Native Americans. Arriving in Yokohama Harbor weeks later, Algren is greeted by English expatriate Simon Graham, a translator and photographer, who, after showing him Tokyo’s bustling streets, escorts the visitor to the palace for an audience with Emperor Meiji. Once there, despite Graham’s etiquette advice, Algren breaks the imperial code by boldly looking into the young emperor's eyes. Days later, during training, Algren learns that veteran Samurai Katsumoto, once a member of the Emperor's Guard and Meiji’s personal teacher, is offended by the country's modernization and plans to lead a rebellion against which the army must soon be prepared to fight. After General Hasegawa, who once fought with Katsumoto, informs Algren that Katsumoto and his Samurai are only armed with swords and arrows, not firearms, the American decides to study his enemy by reading Graham’s extensive writings on the Samurai and Bushido, their code of honor. When days later, Katsumoto attacks a railroad owned by Omura, Algren refuses to follow Omura’s orders to enter into immediate battle and attempts to prove the army’s lack of preparedness by ordering one of his men to shoot at him. The peasant shakes in fear so uncontrollably that he repeatedly misses Algren, but Bagley nevertheless insists they fight Katsumoto. The next day at the foggy, forest battleground, the soldiers hear the approaching Samurai yell and, fearing for their lives, begin shooting too early, thus allowing dozens of Samurai on horseback to expertly wield their swords, wounding most of the men. When Gant is killed, Algren rushes to his side, and, having run out of ammunition, fights several Samurai in hand-to-hand combat, despite his own wounds. Katsumoto watches as a Samurai clad in red armor prepares to deliver the American a final blow, but the prone Algren manages to spear and kill his enemy. Impressed by Algren’s skill and perseverance, Katsumoto decides to take him prisoner rather than kill him. Following his capture, Algren witnesses Hasegawa, who has surrendered to Katsumoto, perform seppuku, a ritual in which a defeated Samurai disembowels himself with his sword to maintain his honor, while another Samurai assists by decapitating the dying man to prevent prolonged pain. After they arrive at a remote mountain village, Algren is housed with Katsumoto’s sister Taka, who is forced to nurse him back to health, despite knowing that the American killed her husband Hirotaro, the warrior in red. Later, Katsumoto, finding Algren's book about military strategies to conquer the Cheyenne, begins to study his enemy, but when he questions Algren about it, the American refuses to answer. Sober and sufficiently recovered from his wounds, Algren is then allowed to walk through the village accompanied by a guard, the Silent Samurai, and observes the Samurais’ diligent daily practice of martial arts and swordsmanship. When he is called before Katsumoto and asked his name, Algren at first refuses to answer, but his curiosity about the seppuku ritual opens up a conversation between the two. After Algren learns that Taka’s husband was the red-armored Samurai he killed during battle, Katsumoto tells the guilt-ridden Algren that it was a “good death.” Although, upon returning to Taka’s house Algren is pleased to be invited to dine with family, Taka insults him in Japanese, which he does not understand, and later begs Katsumoto to remove him from her house. One day, Ujio, the most traditional of Katsumoto’s Samurai, viciously knocks Algren down with his wooden practice sword, as Taka and her young son Higen watch with satisfaction. However, as Algren, despite his lack of skill or strength, continues to stand and face Ujio, Taka and Higen begin to feel sympathy for him. During one of their short conversations, Algren tells Katsumoto that he served under Lt. Col. George Armstrong Custer. Katsumoto praises the illustrious soldier, but Algren retorts that Custer was a vain and malicious murderer. After months of being treated with “mild neglect” while living among the villagers, Algren concludes that, despite their polite and quiet demeanor, the Japanese are filled with emotion and still dedicated to their emperor. Soon after, Algren, having won Taka and the Samurais’ respect, is given traditional Japanese clothing to wear and begins learning Samurai fighting and riding skills, while Higen teaches him Japanese. When one day, Algren expresses his regret to Taka for killing her husband, Taka reminds him that they were both only doing their duties. By the spring of 1877, Algren, who has finally found some peace, realizes that he has been in the village longer than anywhere else since he left home at seventeen, and dedicates himself to becoming as skilled as the Samurai. One day, during a practice fight with Ujio, Algren at first loses, but is then advised by Katsumoto’s son Nobutada to be of “no mind.” Remembering Ujio’s previous moves and honing his concentration, Algren forces his opponent to a draw, surprising all the Samurai. Later, as the town gathers to celebrate the spring planting by watching a comic play, Algren notices the guards have disappeared and, realizing they are about to be attacked, alerts Katsumoto to the danger. Cornered in Taka’s house by dozens of Omura’s warriors, Algren and Katsumoto fight side by side while Katsumoto’s men defeat the remaining attackers outside. Days later, Katsumoto explains Bushido to Algren by noting the timeless beauty of cherry blossoms nearby, and advising him to know life in every breath and face death without fear. Soon after, at the village baths, Algren’s eyes meet Taka’s and, realizing she has deep feelings for him, he thanks her for her kindness. After learning that he has been granted an audience with the emperor, Katsumoto returns Algren’s books to him, explaining that he is no longer an enemy, and they both depart for Tokyo. Algren returns to find Bagley has trained thousands of soldiers, and Omura has promised the army to the emperor if Meiji agrees to sign a new trade treaty. In an audience with Meiji, Katsumoto offers to end his life for the emperor, but when the inexperienced leader asks for advice from his former teacher, Katsumoto insists the emperor must make his own decisions. Later, Omura asks Algren to lead an attack against Katsumoto, but Algren insists he was only hired to train the army and leaves the meeting. Meanwhile, when Katsumoto meets with the council and suggests that Japan has become a “nation of whores” selling themselves to the West, the council arrests him without protest from the emperor. Learning of Katsumoto’s fate, Algren is determined to free his friend, but is attacked by Omura’s men and forced to fight them off with swords. With Graham’s help, Algren then gains entrance to Katsumoto’s cell, where he and Ujio convince Katsumoto to escape rather than kill himself. During the ensuing battle, Nobutada is mortally wounded and, after telling his father that “it is my time” to die, raises his sword and rushes into the enemy fire, allowing the others escape. Later, Katsumoto laments that the Samurai are no longer necessary in the new Japan, but Algren argues that the Samurai must fight Omura’s army to make the emperor understand that the ancient ways must not be forgotten in the wake of Japan’s modernization. Arriving at the village the next day, Algren tells Taka and Higen he will fight alongside the Samurai. When Taka informs Algren that his decision has caused Higen to fear that, in addition to losing his father, he might lose Algren as well, the soldier holds the boy in a tearful embrace. As they make battle plans to defeat Omura’s army, which is armed with machine guns, Algren suggests to Katsumoto that they must lure the enemy in close enough to engage them in sword battle. On 25 May 1877, the day of battle, as Algren prepares himself to greet death, Taka offers him her husband’s suit of armor and slowly undresses and kisses Algren. Later, Katsumoto gives him a handcrafted sword with the inscription “I belong to the warrior in whom the old ways have joined the new.” Later, as they approach the battlefield, Algren hands his notebooks to Graham, who positions himself high above the soldiers to document the battle with his camera. After the first round of cannon fire from Omura’s men, the Samurai light fires to cover their retreat with smoke, luring all of Omura’s infantry into marching behind a hill where the Samurai archers shoot and kill hundreds of the soldiers. After a round of hand-to-hand combat between bayonets and swords, Ujio leads an attack on horseback, but is soon killed. Suddenly a bugle is sounded, signifying the army’s retreat. Realizing that two more regiments will be brought in, Algren tells Katsumoto that the Samurai will now be forced to march into Omura’s machine guns. Lining up his remaining men on the battlefield, Katsumoto lets out a war cry and leads the suicidal charge with Algren at his side. The westernized Omura is incredulous that the defeated Samurai will not surrender despite their losses. Bagley, regaining his sense of honor, mounts his horse and rides into battle to meet his enemy and face his certain death. The soldiers then commence firing the new and powerful Howitzer machine guns, which litter the plain with dead Samurai, injuring both Algren and Katsumoto. Realizing that Katsumoto is mortally wounded, Algren assists his friend in his final courageous act, that of seppuku. As he dies, Katsumoto watches nearby cherry blossoms float through the air and whispers to Algren, “they are all perfect.” Filled with humility at the passing of so great a hero, Omura’s men kneel reverentially in tribute. Days later, Algren interrupts the emperor only moments before he is to sign an American trade treaty. Kneeling before Meiji, Algren offers him Katsumoto’s sword, asks that he remember what his ancestors died for and offers to end his own life at the emperor’s command. Having finally embraced Katsumoto’s advice, the emperor announces that he will not sign the treaty, because it is not in the best interest of his people. Algren then returns to the village, where he is reunited with Taka and her children to begin a new life.