After his novel The Dragon in the Sea was published in 1957, Herbert traveled to Florence, Oregon, at the north end of the Oregon Dunes. Here, the United States Department of Agriculture was attempting to use poverty grasses to stabilize the sand dunes. Herbert claimed in a letter to his literary agent, Lurton Blassingame, that the moving dunes could "swallow whole cities, lakes, rivers, highways." Herbert's article on the dunes, "They Stopped the Moving Sands", was never completed – and only published decades later in The Road to Dune – but its research sparked Herbert's interest in ecology.
Herbert spent the next five years researching, writing, and revising a literary work that was eventually serialized in Analog magazine from 1963 to 1965 as two shorter works, Dune World and The Prophet of Dune. Herbert dedicated his work "to the people whose labors go beyond ideas into the realm of 'real materials'—to the dry-land ecologists, wherever they may be, in whatever time they work, this effort at prediction is dedicated in humility and admiration." The serialized version was expanded, reworked, and submitted to more than twenty publishers, each of whom rejected it. The novel, Dune, was finally accepted and published by Chilton Books, a printing house better known for publishing auto repair manuals.