Composed fitfully over the last five years of his life, the novella Billy Budd represents Melville's return to prose fiction after three decades of only writing poetry. Melville had a difficult time writing, describing his process with Moby-Dick as follows: "Taking a book off the brain is akin to the ticklish & dangerous business of taking an old painting off a panel—you have to scrape off the whole business in order to get at it with safety." The "scrapings" of Billy Budd lie in the 351 leaves of manuscript now in the Houghton Library at Harvard University.
The state of this manuscript has been described as "chaotic," with a bewildering array of corrections, cancellations, cut and pasted leaves, annotations by several hands, and with at least two different attempts made at a fair copy. The composition proceeded in three general phases, as shown by the Melville scholars Harrison Hayford and Merton M. Sealts, Jr., who did an extensive study of the original papers from 1953 to 1962. They concluded from the evidence of the paper used at each stage, the writing instruments (pencil, pen, color of ink), insertions, and crossings out that Melville introduced the three main characters in three stages of composition: first Billy, in a draft of what became "Billy in the Darbies"; then Claggart: and finally Vere.
The work started as a poem, a ballad entitled "Billy in the Darbies", which Melville intended for his book, John Marr and Other Sailors. He added a short, prose head-note to introduce the speaker and set the scene. The character of "Billy" in this early version was an older man condemned for inciting mutiny and apparently guilty as charged. He did not include the poem in his published book. Melville incorporated the ballad and expanded the head-note sketch into a story that eventually reached 150 manuscript pages. This was the first of the three major expansions, each related to one of the principal characters. As the focus of his attention shifted from one to another of these three principals, he modified the plot and thematic emphasis. Because Melville never entirely finished the revisions, critics have been divided as to where the emphasis lay and to Melville's intentions.
After Melville's death, his wife Elizabeth, who had acted as his amanuensis on other projects, scribbled notes and conjectures, corrected spelling, sorted leaves and, in some instances, wrote over her husband's faint writing. She tried to follow through on what she perceived as her husband's objectives but her editing was confusing to the first professional editors, Weaver and Freeman, who mistook her writing for Melville's. For instance, she put several pages into a folder and marked it "Preface?" indicating that she did not know what her husband had intended. At some point Elizabeth Melville placed the manuscript in "a japanned tin box" with the author's other literary materials, where it remained undiscovered for another 28 years.