Porter had been widely praised for her short stories, mostly written between 1922 and 1940. She began work on the novel in 1940, intending it initially to be a novella. It was based on a journal she kept in 1931 during a sea voyage from Veracruz, Mexico, on her way to study in Bremerhaven, Germany, on a Guggenheim Fellowship, and the characters in the novel were based on real people she met during the trip. The title was taken from "Das Narrenschiff" ("The Fool-Ship"), a 15th-century German poem by Sebastian Brant.
For many years, the initial publisher Harcourt Brace would announce the forthcoming novel, but she remained unable to complete it for 22 years. As a result, it became eagerly expected by the literary world. In response to critics who complained about the long wait, Porter said, "Look here, this is my life and my work and you keep out of it. When I have a book I will be glad to have it published."