The Rescue of Sigmund Freud Vienna’s most famous citizen refused to recognize he was in danger, until the 1938 Nazi takeover forced him to flee.

On March 15, 1938, three days after German troops crossed into Austria, Adolf Hitler appeared on the balcony of the Hofburg, Vienna’s imperial palace, to announce the Anschluss, the incorporation of the country of his birth into the Third Reich. An immediate target of the new Nazi overlords: Sigmund Freud. As a Jew, Vienna’s most famous denizen was automatically in danger; as the undisputed face of what most Nazi officials denounced as a Jewish pseudoscience, he was doubly so.

While Nazi thugs quickly invaded the offices of his publishing house, the International Psychoanalytic Press, another group showed up at Berggasse 19, the family’s nearby residence. As recounted by Freud’s oldest son Martin and Ernest Jones, the president of the International Psychoanalytical Association who had flown in from London, the ensuing scenes were high drama.

Trying to shield her ailing 81-year-old husband, Martha Freud threw the “visitors” to the apartment off guard by playing the polite hostess. She pulled out the cash she had on hand and asked: “Won’t the gentlemen help themselves?” Anna, the couple’s youngest daughter, then took them to another room where she emptied the safe of 6,000 shillings, the equivalent of about $840, offering that sum as well.

The stern figure of Sigmund Freud suddenly appeared, glaring at the intruders without saying anything. Visibly intimidated, they addressed him as “Herr Professor” and backed out of the apartment with their loot, declaring that they would return another time. When Freud learned how much they had seized, he remarked, “I have never taken so much for a single visit.”

Freud’s wry sense of humor had not deserted him, but it could not disguise the gravity of the situation. Anna was especially despondent. “Wouldn’t it be better if we all killed ourselves?” she asked her father. Freud’s pointed response indicated he was not about to contemplate anything of the sort. “Why? Because they would like us to?”

But his predicament raised troubling questions: Why had Freud allowed himself and his family to be trapped in this perilous situation? Why had he failed to leave Vienna when it would have been relatively easy for him to do so? And why, even after the first raid, was Freud still reluctant to act? His son Martin who had been held at gunpoint while the Nazis plundered the publishing house, believed that his father was still hoping “to ride out the storm,” expecting “that a normal rhythm would be restored and honest men permitted to go on their ways without fear.”

Freud’s revolutionary insights into the previously uncharted subconscious territory of the human mind should have prepared him for the dark forces propelling his world to tyranny, mass murder and destruction. In his 1930 essay “Civilization and Its Discontents,” he reflected on the “aggressive cruelty” that transforms men into “savage beasts.” After Hitler took power in Germany in 1933, Freud somberly concluded: “The world is turning into an enormous prison.”

Yet as much as he recognized the broader trends, Freud was reluctant to apply them to his own situation. On May 10, 1933, when the Nazis organized a bonfire of books in Berlin by authors they hated, Freud’s works were among them. “What progress we are making,” he declared to a colleague afterward. “In the Middle Ages they would have burned me; nowadays they are content with burning my books.” As his biographer Peter Gay put it, “This must have been the least prescient bon mot he ever made.”

Freud realized he was wrong soon enough. He supported the decision of Ernst and Oliver, his sons who had been living in Berlin, to flee to Britain and France that same year. “Life in Germany had become impossible,” he explained in a letter to a nephew in England. But Freud clung to the notion that Austria was different, despite a growing Nazi movement there, arguing that “it is very unlikely that it will present a similar danger as in Germany.”

Austria was led by Catholic politicians who imposed their own brand of fascism but tried to fend off Hitler. Chancellor Engelbert Dollfuss banned the Nazi Party, only to be assassinated by local Nazis on July 25, 1934. Still, Freud desperately wanted to believe his successor’s assurances that he would continue a policy of independence. “Our brave and in its way decent government is now more energetic than hitherto in keeping the Nazis at bay,” he wrote on Feb. 6, 1938, only a month before the Anschluss.

A combination of old age and illness, the jaw cancer that was the product of years of cigar-smoking, contributed to Freud’s state of semi-denial about the looming danger—although he admitted that the “Prussian barbarians” might prove to be unstoppable. The other factor was his deep attachment to Vienna, the culturally vibrant, cosmopolitan city where he had spent almost his entire life; he did not want to end it anywhere else.

Freud’s hesitation finally evaporated when the Gestapo summoned his devoted daughter Anna. She was handling the negotiations with the new Nazi overlords, who were intent on extorting as much money as possible from wealthy Jews seeking to emigrate. By the time she was interrogated and released, Freud recognized that he had to flee mainly for her sake. She had so much longer to live—and he knew she would not leave him under any circumstances.

Marie Bonaparte, Freud’s avid French disciple (and Napoleon’s great-grandniece), put up much of the de facto ransom money to win his freedom. William Bullitt, the U.S. ambassador to France who had also been treated by Freud, offered additional financial support if needed and made sure the Nazis were aware that American diplomats in Vienna were closely monitoring their handling of him. Jones arranged for the Freud party to receive entry permits to Britain, an impressive feat given the growing reluctance of many governments to admit Jewish refugees.

On June 2, a Nazi official presented Freud with a final document to sign, which stated that he had been well treated. Knowing that he had no choice in the matter, he signed it. But afterward he couldn’t resist asking the official whether he could add one sentence: “I can heartily recommend the Gestapo to anyone.” The official shot Freud an angry look and rushed out the door.

On June 4, the Freuds boarded the Orient Express to Paris, where they would spend a day with Marie Bonaparte before proceeding to London. As the train rolled through Germany, passing Munich and Dachau, the air of tension in the compartment was palpable. A doctor who was accompanying Freud treated him with nitroglycerin and strychnine to relieve his “painful cardiac weariness.”

At 3:30 a.m. the train approached the frontier. Much to everyone’s relief, the German border guards only glanced briefly at the passports and other documents that the Freuds handed over to them. The train then crossed the Rhine, entering France. Leaning back in his seat, Freud declared: “Now we are free.”

Mr. Nagorski is a former foreign correspondent and editor for Newsweek. This essay is adapted from his new book “Saving Freud: The Rescuers Who Brought Him to Freedom,” which will be published by Simon & Schuster on Aug. 23.