Frederick Mayer, at right, with Franz Weber, left, and Hans Wynberg. A German-born Jew, he fled his home in the Black Forest in 1938 and made a new life in the United States, then ventured back into Nazi Europe as a U.S. spy. (Frederick Mayer/Courtesy of Patrick K. O’Donnell )

Frederick Mayer was a person, a friend once observed, whose “fear nerve is dead.” A German-born Jew, he fled his home in the Black Forest in 1938 and made a new life in the United States, then ventured back into Nazi Europe as a U.S. spy.

His exploits — parachuting onto an Alpine glacier, infiltrating enemy lines, posing as a German officer to gather vital intelligence, and enduring lengthy torture sessions before essentially negotiating the surrender of the city of Innsbruck, Austria — seemed in hindsight the stuff of movies. “Inglourious Basterds” (2009), director Quentin Tarantino’s historical fiction about justice-seeking Jewish American soldiers during World War II, could have been modeled after Mayer and his comrades.

Mr. Mayer, who was described at times as a “real inglorious bastard,” died April 15 at his home in Charles Town, W.Va. He was 94 and had been diagnosed with pancytopenia, a blood deficiency, said a daughter, Claudette Mayer.

Mr. Mayer once told an interviewer that he had a “good combination of hatred and love” — a “hatred of the Nazis and a love for America.” The son of a decorated World War I veteran, he had seen his family pushed from its homeland by a regime that would slaughter 6 million European Jews in the Holocaust.

After the Japanese attack on Pearl Harbor, Mr. Mayer enlisted in the U.S. Army. “It felt like I had my chance to do what I set out to do — kill Nazis,” he said in the TV film “The Real Inglorious Bastards” (2012). “That’s why all the Jewish boys joined.”

Frederick Mayer, a German Jew who returned to Nazi Europe as a U.S. spy, speaks about his experiences. Mayer died April 15 at his home in Charles Town, W.Va. (West Virginia Secretary of State)

Impressed by his skill and pluck, and intrigued by his native fluency in German, Mr. Mayer’s superiors recommended him for the Office of Strategic Services, a wartime precursor to the CIA. He was attached to the German Operational Group before shipping out.

“A more eclectic group of desperados could not be found: former Luftwaffe pilots, Jewish escapees from German death camps, Polish deserters, world-class athletes, and even a former convict,” historian Patrick K. O’Donnell wrote in the volume “They Dared Return: The True Story of Jewish Spies Behind the Lines in Nazi Germany.”

One recruit described the group as “the craziest people I have ever met in my entire life.”

By late 1944, Mr. Mayer had arrived in Europe, where, dissatisfied by what he considered the slow pace of his work, he talked his way into the Secret Intelligence division of the OSS. He became the leader of Operation Greenup, a mission to gather intelligence in the area of Innsbruck, where the Allies suspected the Germans might mount a final stand in the war.

The night of Feb. 25, 1945, Mr. Mayer flew from his base in Italy to the Austrian mountains, parachuting onto a frozen lake in the treacherous terrain.

“He didn’t seem to have any fear of the fact that he was going back into Nazi Germany,” John Billings, the command pilot of that mission, said in an interview Tuesday. “What he did just the first night would cause a very immediate laundry emergency for me.”

Working alongside Mr. Mayer were Hans Wynberg, a Dutch-born Jew whose family had been deported to Auschwitz, and Franz Weber, an Austrian officer whose patriotism had led him to defect from the German army. The three fashioned a pair of skis into a sled and made their way down a mountain, at times navigating snow as deep as their shoulders.

Mr. Mayer, disguised in a German uniform. (Frederick Mayer/Courtesy Patrick K. O’Donnell )

When they reached a village, they masqueraded as German Alpine servicemen separated from their units. Evading detection by the Gestapo, they arrived March 3, 1945, in Oberperfuss, a Tyrolean village near Innsbruck where they would make their base until the end of the war.

With assistance from Weber’s sister, a nurse, Mr. Mayer disguised himself as a German officer, complete with a uniform and bandages for a feigned head wound. Later, he posed as a French electrician to infiltrate a Messerschmitt factory.

He was credited with gathering intelligence and building a network of informants that helped determine the location and dimensions of Hitler’s Führerbunker in Berlin, the condition of Nazi war plants and the movement of enemy freight and troops, particularly through the Brenner Pass.

In time, Mr. Mayer was betrayed by a member of his spy network, imprisoned and tortured. According to O’Donnell’s account, his captors broke his teeth with a pistol. He was whipped, doused with water and suspended from a rifle “like game on a spit.”

By that time, Allied troops were closing in on Innsbruck. Mr. Mayer capitalized on an impression among the Germans, concerned for their fate in the event of defeat, that he was a high-ranking American officer. He was credited with persuading the regional Nazi authority to declare Innsbruck an open city.

“The Germany Army in that area had in effect surrendered to an OSS Jewish Sergeant,” according to the book “This Grim and Savage Game: OSS and the Beginning of U.S. Covert Operations in World War II” by Tom Moon.

Friedrich Mayer was born in Freiburg on Oct. 28, 1921. After Hitler became German chancellor in 1933, the family’s hardware store was boycotted because they were Jewish.

Mr. Mayer’s father resisted leaving Germany, thinking that his past military service would shield the family from persecution, while his mother insisted that the family go to the United States. Young Fritz, as he was known, did not oppose the idea because he had grown enchanted with cowboy stories of the American West.

He changed his name to Frederick after the family arrived in New York. For a time, he was his family’s breadwinner, working as a mechanic at companies including Ford and General Motors before joining the Army. After the war, he worked for Voice of America as a power plant engineer supervisor in the Philippines, Morocco, West Germany, Liberia and Thailand. He retired in 1977.

His marriage to Sylvia Stieber ended in divorce. Survivors include his companion of nearly two decades, Virginia Nash of Bolivar, W.Va.; two daughters from his marriage, Claudette Mayer of New York City and Irene Mayer-Feldberg of San Francisco; a sister; a grandson; and a great-grandson.

In 1945, a superior officer recommended Mr. Mayer for the Medal of Honor, writing that “in constant danger of his life,” he had “exhibited almost unbelievable courage, resourcefulness and enterprise,” according to a copy of the nomination provided by Charles Pinck, president of the OSS Society. Mr. Mayer ultimately received the Legion of Merit.

O’Donnell, who described Mr. Mayer in an interview as “one of the greatest heroes of World War II,” recounted in his book Mr. Mayer’s meeting at the end of the war with a member of the Gestapo who had tortured him during his imprisonment.

Mr. Mayer was taken to see him in a cell, where he found the man beaten and quaking in fear. “Do anything you want with me,” he begged, “but don’t hurt my family.”

“Who do you think we are?” Mr. Mayer replied. “Nazis?”