In the 1870s, Captain Nathan Algren, a disillusioned American Civil War veteran struggling with deep emotional trauma, is hired to train the newly formed Imperial Japanese Army. As the modernized military prepares to crush a rebellion of traditional samurai warriors, Algren is captured during an early skirmish by the rebel leader Katsumoto. During his months of captivity in a remote mountain village, Algren learns the philosophy, honor, and martial arts of the samurai code. Embracing their way of life, he eventually joins their ranks to fight for their traditions against the relentless march of industrial modernization.