In 1951, after 25 years in show business, Gary Cooper's professional reputation was in decline, and he was dropped from the "Motion Picture Herald's" list of the top-ten box-office performers. In the following year, he made a big comeback, at the age of 51, with this film.
Lee Van Cleef was originally hired to play Deputy Marshal Harvey Pell. However, producer Stanley Kramer decided that his nose was too "hooked," which made him look like a villain, and told him to get it fixed. Van Cleef refused, and Lloyd Bridges got the part. Van Cleef was given the smaller role of gunman Jack Colby, one of the Miller gang.
There was some question as to the casting of Gary Cooper, since he was 50 and Grace Kelly, playing his wife, was only 21, despite this being fairly commonplace for the period in which this film was set. Will Kane was only supposed to be about 30.
Among other accomplishments, the film was a milestone in scoring. It introduced the idea of a theme song to be marketed separately from the movie, and to be a motif for the instrumental score throughout the film. Tex Ritter (John Ritter's father) sang the song "Do Not Forsake Me," whose lyrics are from the point of view of the hero appealing to his new wife, Amy, to stay with him.
Fred Zinnemann said that the black smoke billowing from the train is a sign that the brakes were failing. He and the cameraman didn't know it at the time, and barely got out of the way. The camera tripod snagged itself on the track and fell over, smashing the camera, but the film survived, and is in the movie.