In 1879, members of an outlaw gang known to wear red sashes called the Cowboys, led by "Curly Bill" Brocius, ride into a Mexican town and interrupt a local police officer's wedding. They then proceed to massacre the assembled policemen in retribution for killing two of their fellow gang members. Shortly before being shot, a local priest warns them that their acts of murder and savagery will be avenged, referencing the biblical fourth horseman.
Wyatt Earp, a retired peace officer with a notable reputation, reunites with his brothers Virgil and Morgan in Tucson, Arizona, where they venture on toward Tombstone to settle down. There they encounter Wyatt's long-time friend Doc Holliday, who is seeking relief in the dry climate from his worsening tuberculosis. Josephine Marcus and Mr. Fabian are also newly arrived with a traveling theater troupe. Meanwhile, Wyatt's common-law wife, Mattie Blaylock, is becoming dependent on laudanum. Wyatt and his brothers begin to profit from a stake in a gambling emporium and saloon when they have their first encounter with the Cowboys. The Cowboys are identifiable by the red sashes worn around their waists.
As tensions rise, Wyatt is pressured to help rid the town of the Cowboys, though he is no longer a lawman. Curly Bill begins shooting at the sky after a visit to an opium den and is told by Marshal Fred White to relinquish his firearms. Curly Bill instead shoots the marshal dead, and is forcibly taken into custody by Wyatt. The arrest infuriates Ike Clanton and the other Cowboys. Curly Bill stands trial, but is found not guilty due to a lack of witnesses. Virgil, unable to tolerate lawlessness, becomes the new marshal and imposes a weapons ban within the city limits. This leads to a gunfight at the O.K. Corral, in which Billy Clanton and the McLaury brothers are killed. Virgil and Morgan are wounded, and the allegiance of county sheriff Johnny Behan with the Cowboys is made clear. As retribution for the Cowboy deaths, Wyatt's brothers are ambushed; Morgan is killed, while Virgil is left handicapped. A despondent Wyatt and his family leave Tombstone and board a train, with Ike Clanton and Frank Stilwell close behind, preparing to ambush them. Wyatt sees that his family leaves safely, and then surprises the assassins. He kills Stilwell, but lets Clanton live to send a message: Wyatt announces that he is a U.S. marshal, and that he intends to kill any man he sees wearing a red sash. Wyatt, Doc, a reformed Cowboy named Sherman McMasters, Texas Jack Vermillion, and Turkey Creek Jack Johnson, form a posse to seek revenge.