John Huston wanted a then almost-unknown Marilyn Monroe for a part in this movie. He made it about Cuban rebels at the time Monroe had a contract with Columbia. But producer Sam Spiegel didn't want to spend money for a screen test of Monroe.
One of the writers, Peter Viertel, wrote a chapter in his book Dangerous Friends about how he and John Huston wrote the screenplay for We Were Strangers, including two weeks in Cuba with Ernest Hemingway. According to Viertel, Hemingway suggested ending the film as it occurred in reality: with the death of the revolutionaries. Instead, an alternative ending was supplied by Ben Hecht.