In 1985, Stanley Kubrick was handed a book on the survival of jazz in Nazi-occupied Europe. A snapshot of a Luftwaffe officer casually posing among black, Gypsy, and Jewish musicians outside a Paris nightclub caught his eye.

It looked like something out of Dr. Strangelove, he said. He'd long wanted to bring World War II to the screen, and perhaps this photograph offered a way in.

"Stanley's famous saying was that it was easier to fall in love than find a good story," says Tony Frewin, Kubrick's longtime assistant (and, for the purpose of disclosure, an editor-at-large at my former magazine,Stop Smiling). "He was limitlessly interested in anything to do with Nazis and desperately wanted to make a film on the subject."

Kubrick has long been associated with creating arresting visions of warfare. When it was announced this month that Steven Spielberg will produce Kubrick's screenplay Napoleon as a television miniseries, the initial speculation was largely about how the ambitious battle scenes, originally conceived to maximize tens of thousands of extras, will be achieved.

However, it's Kubrick's interest in jazz-loving Nazis that represents his most fascinating unrealized war film. The book that Kubrick was handed, and one he considered adapting soon after wrapping Full Metal Jacket, was Swing Under the Nazis, published in 1985 and written by Mike Zwerin, a trombonist from Queens who had performed with Miles Davis and Eric Dolphy before turning to journalism. The officer in that Strangelovian snapshot was Dietrich Schulz-Koehn, a fanatic for "hot swing" and other variations of jazz outlawed as "jungle music" by his superiors. Schulz-Koehn published an illegal underground newsletter, euphemistically referred to as "travel letters," which flaunted his unique ability to jaunt across Western Europe and report back on the jazz scenes in cities conquered by the Fatherland. Kubrick's title for the project was derived from the pen name Schulz-Koehn published under: Dr. Jazz.

"Stanley was fond of titles in search of screenplays," Frewin says. "And Dr. Jazz was such a rich subject—the contrast of what was going on in the camps, on the Eastern front, and yet here was a German officer who was having a good time listening to jazz. Stanley was also drawn to what this said about music and its ability to unify people and transcend even rigid political differences."

While a script for Dr. Jazz never materialized—and the project was later shelved, in part due to Aryan Papers, a film set in occupied Poland that Kubrick abandoned in the mid-'90s despite an intensive preproduction—Zwerin's research remains engrossing today.

Reuters Though stationed in Paris for more than 20 years as the jazz critic for the International Herald Tribune, Zwerin never acclimated. "I consider myself on loan, like a Picasso," he writes in Swing. "One year led to another and now I find myself without a place to hang." Parisian loneliness had become "literally breathtaking, a gasp not a gas." Seeking refuge, Zwerin traveled the continent collecting interviews with the jazz preservationists who gathered in basements and backrooms during occupation, and filed their reminiscences in the IHT, among other publications. (Swing is a collection of his columns that reads like a collage, with digressions upon digressions.)

Zwerin is at his best when conversing with musicians—at one point he even brandishes his horn for a post-interview blowing session—but the more surreal findings come from encounters with the occasional toe-tapping retired Nazi officer. In the skies over London, we learn that a Luftwaffe ace tuned into the BBC while crossing the Channel, hoping to catch a few bars of Glenn Miller before bombing the radio antenna. On the ground, when the Royal Air Force rained bombs on Vienna, a trombonist in a Nazi swing band "would stick his trombone out the window and play 'St. Louis Blues' instead of hiding in the cellar." (In order for that particular jazz standard to pass muster in Vienna, the title was first changed to "Sauerkraut.")

Throughout the book's mere 200 pages, Zwerin unearths lost notes from the underground. A Django Reinhardt record was worth two kilos of butter on the black market. A German objector fondly recalls scoring the plum assignment of tracking down the cream Louis Armstrong preferred for his chapped lips; the brand was available only at pharmacies in Berlin. Upon receiving the shipment of lip salve, which was smuggled Stateside through a Paris club owner, Louis mailed his unknown German aid a personal letter of thanks.

Zwerin unearths lost notes from the underground; for instance, a Django Reinhardt record was worth two kilos of butter on the black market.

Not all accounts are as lighthearted. Zwerin mourns the Jewish musicians who clung to life by entertaining guards in concentration camps, and those on the run, like Eric Vogel, a Czech jazz trumpeter who soaked his valves in sulfuric acid when Nazis invaders began confiscating instruments. The acid served "to keep anyone from playing military marches on a jazz trumpet." In a 1961 article for Down Beat, Vogel claims his life was spared during a ghetto roundup when an SS officer who had eavesdropped on one of his jam sessions recognized him at headquarters and escorted him home, borrowing some of his jazz records and books as compensation. In Frankfurt, musicians wandered the streets whistling "Harlem"—if a fellow musician recognized the tune, he whistled back.

These clandestine cues and back-alley trysts were a draw for Kubrick. "Stanley thought there was a kind of noir side to this material," says Frewin. "Perhaps an approach like Dr. Mabuse would have suited the story. Stanley said, 'If only he were alive, we could have found a role for Peter Lorre.'"

One intriguing character to cast would have been the German musician Ernst Hollerhagen, who one of Zwerin's interview subjects claims "played the clarinet as good as Benny Goodman, but he had not been born black or Jewish or American." (Goodman records could be purchased in Germany until 1938, Zwerin writes, "then somebody must have realized he was Jewish. After that you could buy Artie Shaw records because they did not know his real name was Arshawsky.") As an act of defiance one night after a show in Frankfurt in 1942, Hollerhagen walked up to a table of musicians at the club, "clicked his heels, raised his right arm, and said in a loud voice so everyone could hear: 'Heil Benny!'"

"Stanley was a great swing-era jazz fan," Frewin says, citing Goodman as one of his favorites. "He had some reservations about modern jazz. I think if he had to disappear to a desert island, it'd be a lot of swing records he'd take, the music of his childhood: Count Basie, Duke Ellington, Harry James." Kubrick had long wanted to use a particular Harry James track in a film, and felt Dr. Jazz afforded the perfect opportunity. When it appeared in Woody Allen's Hannah and Her Sisters, according to Frewin, "it really miffed Stanley that Woody beat him to it." The title, ironically, was "I've Heard That Song Before."

When Mike Zwerin died in 2010, Swing Under the Nazis remained underreported in tributes and appreciations, which is perhaps fitting, given Zwerin's allegiance with artists whose best takes didn't always make it to tape. "I started out to explore a neglected corner of history but it ended up exploring me," he writes in the book's introduction. That his exploration never reached a wider audience is hardly a fault. He whistled a tune down an empty street and Stanley Kubrick whistled back.