During the American Civil War, Captain Robert Shaw, injured at Antietam, is sent home to Boston on medical leave. Shaw accepts a promotion to colonel commanding the 54th Massachusetts Infantry Regiment, one of the first all-black regiments in the Union Army. He asks his friend, Cabot Forbes, to serve as his second in command, with the rank of major. Their first volunteer is another friend, Thomas Searles, a bookish, free African-American. Other recruits include John Rawlins, Jupiter Sharts, Silas Trip, and a mute teenage drummer boy.
The men learn that, in response to the Emancipation Proclamation, the Confederacy has issued an order that all black soldiers will be returned to slavery. Black soldiers found in a Union uniform will be executed as well as their white officers. They are offered, but turn down, a chance to take an honorable discharge. They undergo rigorous training from Sergeant-Major Mulcahy, which Shaw realizes is needed to prepare them for the coming challenges the regiment must face.
Trip goes AWOL and is caught; Shaw orders him flogged in front of the regiment. He then learns that Trip left to find shoes because his men are being denied these supplies. Shaw confronts the base’s racist quartermaster on their behalf. Shaw also supports his men in a pay dispute; the Federal government decrees that black soldiers will only be paid $10, not the $13 per month all white soldiers receive. When the men begin tearing up their pay vouchers in protest of this unequal treatment, Shaw tears up his own voucher in support of his men. In recognition of his regimental leadership, Rawlins is promoted by Shaw to the rank of Sergeant-Major.
Once the 54th completes its training, they are transferred under the command of General Charles Harker. On the way to South Carolina they are ordered by Colonel James Montgomery to sack and burn Darien, Georgia. Shaw initially refuses to obey an unlawful order, but reluctantly agrees under threat of having his command taken away. He continues to lobby his superiors to allow his regiment to join the fight, as their duties to date have involved mostly manual labor. Shaw finally gets the 54th a combat assignment after he blackmails Harker by threatening to report the illegal activities he has discovered. In their first battle at James Island, South Carolina, the 54th successfully defeats a Confederate attack that had routed other units. During the battle, Searles is wounded but saves Trip. Shaw offers Trip the honor of bearing the regimental flag in battle. He declines, not sure that the war will result in a better life for ex-slaves like himself.
General George Strong informs Shaw of a major campaign to secure a foothold at Charleston Harbor. This involves assaulting Morris Island and capturing Fort Wagner, whose only landward approach is a strip of open beach; a charge is certain to result in heavy casualties. Shaw volunteers the 54th to lead the attack. The night before the battle, the black soldiers conduct a religious service. Several make emotional speeches to inspire others. On their way to the battlefield, the 54th is cheered by the same Union troops who had scorned them earlier.
The 54th leads the charge on the fort, suffering serious losses. As night falls, the regiment is pinned down against the walls of the fort. Attempting to encourage his men forward, Shaw is killed by numerous gunshots. Trip, despite his previous assertion that he would not do it, lifts the flag to rally the soldiers to continue, but he too is soon shot dead. Forbes and Rawlins take charge, and the soldiers break through the fort’s defenses. Seemingly on the brink of victory, Forbes, Rawlins, Searles, Sharts, and the two Color Sergeants are fired upon by Confederate artillery. The morning after the battle, the beach is littered with the bodies of black and white Union soldiers; the Confederate flag is raised over the fort. The dead Union soldiers are buried in a mass communal grave, with Shaw and Trip’s bodies next to each other.
Closing text reveals (incorrectly) that Fort Wagner never fell to the Union Army. However, the courage demonstrated by the 54th resulted in the United States accepting thousands of black men for combat, and President Abraham Lincoln credited them with helping to turn the tide of the war.