In 1879, corrupt industrialist Bartholomew Bogue (Peter Sarsgaard) besieges the mining town of Rose Creek, and slaughters a group of locals led by Matthew Cullen (Matt Bomer) when they attempt to stand up to him. Matthew's wife, Emma Cullen (Haley Bennett), and her friend, Teddy Q (Luke Grimes), ride to the nearest town in search of someone who can help them and come upon warrant officer Sam Chisholm (Denzel Washington) of Wichita, Kansas, who initially declines their proposal until he learns of Bogue's involvement.
Chisholm sets out to recruit a group of gunslingers who can help him, starting with gambler Josh Faraday (Chris Pratt). They are later joined by sharpshooter Goodnight Robicheaux (Ethan Hawke), knife-wielding Billy Rocks (Lee Byung-hun), notorious Mexican outlaw Vasquez (Manuel Garcia-Rulfo), skilled tracker Jack Horne (Vincent D'Onofrio), and Comanche warrior Red Harvest (Martin Sensmeier).
Arriving in Rose Creek, the seven engage in a gunfight with Bogue's enforcer McCann (Cam Gigandet) and his men, shoot dead 22 of them, and drive the corrupt sheriff away with a warning to leave Rose Creek alone. Surmising that Bogue and his forces will return in a week, the seven and Cullen train the townspeople to defend their home and grow fond of them. Robicheaux, haunted by the horrors of the Civil War and fearing the inevitable killing he will be a part of, abandons the group and is replaced by Cullen.
Bogue arrives with his forces and attacks the city, but the bandits are ambushed by the townspeople, leading to a shootout during which Robicheaux rejoins the group. Bogue then unveils his secret weapon, a Gatling gun, with which he kills numerous innocents. Realizing they're outgunned, the seven drive the townspeople away and mount their last stand. Horne is killed by Bogue's Comanche assassin Denali (Jonathan Joss), who is later killed by Red Harvest.
Robicheaux and Rocks are killed by a second round of gunfire as Faraday sacrifices himself to destroy the Gatling gun and the rest of Bogue's men, riding up to them in a final charge and then detonating a stick of dynamite right next to the gun. Bogue flees into town, where he is confronted by Chisholm, who disarms and wounds Bogue. As Chisholm is strangling Bogue, he reveals that Bogue and his men raped and murdered his mother and sisters during a raid several years earlier, in which he himself survived being hanged. Bogue is then fatally shot by Cullen while reaching for a hidden gun in his boot.
In the aftermath, Faraday, Robicheaux, Rocks and Horne are buried in town and honored by the people of Rose Creek as heroes, while Chisholm, Vasquez and Red Harvest ride off. The film ends with Cullen remarking that their heroism made them legends and that it was "magnificent".