Four different endings were filmed, but all were ultimately deemed unsatisfactory during previews. A letter from an audience member suggested a fifth ending, which Frank Capra liked and used in the finished film.
Frank Capra didn't want anyone to play John Doe except Gary Cooper, who agreed to the part (without reading a script) for two reasons: he had enjoyed working with Capra on Mr. Deeds Goes to Town (1936) and he wanted to work with Barbara Stanwyck.
Contrary to popular belief, there is no "longer" version of this film; it has always run 123 minutes. However, original publicity erroneously stated it was 132 minutes because the printer accidentally transposed the last two numbers. For years film historians assumed that all reissue prints had been cut by nine minutes until an original fine-grain master was uncovered which also turned out to run 123 minutes. This is the correct running time for the film.
Regis Toomey had already memorized his monologue about the John Doe Clubs for his audition, so the day he was supposed to shoot it, Frank Capra asked if he needed a rehearsal. Toomey didn't, so they shot the scene in one take.