Heller wanted to be a writer from an early age. His experiences as a bombardier during World War II inspired Catch-22; Heller later said that he "never had a bad officer". In a 1977 essay on Catch-22, Heller stated that the "antiwar and antigovernment feelings in the book" were a product of the Korean War and the 1950s rather than World War II itself. Heller's criticisms are not intended for World War II but for the Cold War and McCarthyism.
The influence of the 1950s on Catch-22 is evident through Heller's extensive use of anachronism. Though the novel is ostensibly set in World War II, Heller intentionally included anachronisms like loyalty oaths and computers (IBM machines) to situate the novel in the context of the 1950s. Many of the characters are based on or connected to individuals from the 1950s:
- Milo Minderbinder's maxim "What's good for M&M Enterprises is good for the country" alludes to the former president of General Motors Charles Erwin Wilson's statement before the Senate: "What's good for General Motors is good for the country."
- The question of "Who promoted Major Major?" alludes to Joseph McCarthy's questioning of the promotion of Major Peress, an army dentist who refused to sign loyalty oaths.
Czech writer Arnošt Lustig recounts in his book 3x18 that Joseph Heller told him that he would never have written Catch-22 had he not first read The Good Soldier Švejk by Jaroslav Hašek.
In 1998, some critics raised the possibility that Heller's book had questionable similarities to Louis Falstein's 1950 novel, Face of a Hero. Falstein never raised the issue between Catch-22's publication and his death in 1995 and Heller claimed never to have been aware of the obscure novel. Heller said that the novel had been influenced by Céline, Waugh and Nabokov. Many of the similarities have been stated to be attributable to the authors' experiences, both having served as U.S. Army Air Forces aircrew in Italy in World War II. However, their themes and styles are different.