Leaves of Grass has its genesis in an essay called The Poet by Ralph Waldo Emerson, published in 1844, which expressed the need for the United States to have its own new and unique poet to write about the new country's virtues and vices. Whitman, reading the essay, consciously set out to answer Emerson's call as he began work on the first edition of Leaves of Grass. Whitman, however, downplayed Emerson's influence, stating, "I was simmering, simmering, simmering; Emerson brought me to a boil".
On May 15, 1855, Whitman registered the title Leaves of Grass with the clerk of the United States District Court, Southern District of New Jersey, and received its copyright. The first edition was published in Brooklyn at the Fulton Street printing shop of two Scottish immigrants, James and Andrew Rome, whom Whitman had known since the 1840s, on July 4, 1855. Whitman paid for and did much of the typesetting for the first edition himself. The book did not include the author's name, instead offering an engraving by Samuel Hollyer depicting the poet in work clothes and a jaunty hat, arms at his side. Early advertisements for the first edition appealed to "lovers of literary curiosities" as an oddity. Sales on the book were few but Whitman was not discouraged.
The first edition was very small, collecting only twelve unnamed poems in 95 pages. Whitman once said he intended the book to be small enough to be carried in a pocket. "That would tend to induce people to take me along with them and read me in the open air: I am nearly always successful with the reader in the open air." About 800 were printed, though only 200 were bound in its trademark green cloth cover. The only American library known to have purchased a copy of the first edition was in Philadelphia. The poems of the first edition, which were given titles in later issues, were "Song of Myself", "A Song for Occupations", "To Think of Time", "The Sleepers", "I Sing the Body Electric", "Faces", "Song of the Answerer", "Europe: The 72d and 73d Years of These States", "A Boston Ballad", "There Was a Child Went Forth", "Who Learns My Lesson Complete?" and "Great Are the Myths".
The title Leaves of Grass was a pun. "Grass" was a term given by publishers to works of minor value and "leaves" is another name for the pages on which they were printed.
Whitman sent a copy of the first edition of Leaves of Grass to Emerson, the man who had inspired its creation. In a letter to Whitman, Emerson said "I find it the most extraordinary piece of wit and wisdom America has yet contributed." He went on, "I am very happy in reading it, as great power makes us happy."
There have been held to be either six or nine editions of Leaves of Grass, the count depending on how a given scholar distinguishes between issues and editions. Scholars who hold that an edition is an entirely new set of type will count the 1855, 1856, 1860, 1867, 1871–72, and 1881. Others add in the 1876, 1888–89, and 1891-92 (the "deathbed edition").
It was Emerson's positive response to the first edition that inspired Whitman to quickly produce a much-expanded second edition in 1856, now 384 pages with a cover price of a dollar. This edition included a phrase from Emerson's letter, printed in gold leaf: "I Greet You at the Beginning of a Great Career." Emerson later took offense that this letter was made public and would become more critical of the work.
The publishers of the 1860 edition, Thayer and Eldridge, declared bankruptcy shortly after its publication and were almost unable to pay Whitman. "In regard to money matters", they wrote, "we are very short ourselves and it is quite impossible to send the sum". Whitman received only $250 and the original plates made their way to Boston publisher Horace Wentworth. When the 456-page book was finally issued, Whitman said, "It is quite 'odd', of course", referring to its appearance: it was bound in orange cloth with symbols like a rising sun with nine spokes of light and a butterfly perched on a hand. Whitman claimed that the butterfly was real in order to foster his image as being 'one with nature'. In fact, the butterfly was made of cloth; it was attached to his finger with wire.
The 1867 edition was intended to be, according to Whitman, "a new & much better edition of Leaves of Grass complete — that unkillable work!" He assumed it would be the final edition. The edition, which included the Drum-Taps section and its Sequel and the new Songs before Parting, was delayed when the binder went bankrupt and its distributing firm failed. When it was finally printed, it was a simple edition and the first to omit a picture of the poet.
In 1879, Richard Worthington purchased the electrotype plates and began printing and marketing unauthorized copies.
The eighth edition in 1889 was little changed from the 1881 version, though it was more embellished and featured several portraits of Whitman. The biggest change was the addition of an "Annex" of miscellaneous additional poems.
As 1891 came to a close, Whitman prepared a final edition of Leaves of Grass, writing to a friend upon its completion, "L. of G. at last complete — after 33 y'rs of hackling at it, all times & moods of my life, fair weather & foul, all parts of the land, and peace & war, young & old". This last version of Leaves of Grass was published in 1892 and is referred to as the "deathbed edition". In January 1892, two months before Whitman's death, an announcement was published in the New York Herald:
Walt Whitman wishes respectfully to notify the public that the book Leaves of Grass, which he has been working on at great intervals and partially issued for the past thirty-five or forty years, is now completed, so to call it, and he would like this new 1892 edition to absolutely supersede all previous ones. Faulty as it is, he decides it as by far his special and entire self-chosen poetic utterance.
By the time this last edition was completed, Leaves of Grass had grown from a small book of 12 poems to a hefty tome of almost 400 poems. As the volume changed, so did the pictures that Whitman used to illustrate them—the last edition depicts an older Whitman with a full beard and jacket, appearing more sophisticated and wise.