In 1886, Sheriff John Grail (Rod Taylor) is leading a posse after the Pike gang: brothers Harland (William Lucking) and Billy Pike (Patrick Hauser), Wolfson "Wolf" Lucas (Charles Napier), and Isaiah "Ice" McAdams (Richard Roundtree). Grail and his posse capture the men in a box valley that contains an old Indian burial ground. Grail once rode with the gang but now he's a lawman. He goes in alone to ask them to surrender but the Pike gang refuses. They draw guns but a bolt of lightning strikes and all five men are thrown 100 years forward in time. In order to survive in the modern world they find themselves in and wanting to find a way back to their own time, they start working together as private detectives.
It's Maggie's birthday and the gang throw a party for her at the ranch. However, a mobster is seeking revenge and shows up with his men, and a birthday party becomes a fight for survival.