In July 1855, a pair of Scottish immigrant brothers, Andrew and Thomas Rome, published about 800 copies of a book of a dozen poems at their Brooklyn Heights printing press. The title of the text, Leaves of Grass, was printed in vine-like gold letters on its rich green front cover, which made no mention of its author, Walt Whitman, a friend of the Rome brothers who had talked them into publishing his book of poetry.

The text was “like no other book that ever was written”, a critic for Life Illustrated claimed at the time. Readers cracked open Leaves of Grass to find an engraved frontispiece of Whitman, his gaze direct, one hand on his hip and the other in his pants pocket, framing an outfit – consisting of a wide-brimmed hat and a loose, unbuttoned shirt – that was unusually bohemian for a member of his contemporary literary class. To some, the text was even more surprising than the image of Whitman’s likeness: the author penned the 12 poems in free verse, eschewing traditional standards of rhyme and meter, and addressed his readers directly – and often in the first person – while inquiring ideas about death, democracy, sexuality and the body.

Within weeks of the initial publication, Ralph Waldo Emerson called the text “the most extraordinary piece of wit and wisdom that America has yet contributed”. And Sara Willis – also known as Fanny Fern, America’s first professional female newspaper columnist – praised Whitman’s work in her column in the New York Ledger the following year. But outrage over Whitman’s frank, sensual literary musings reverberated throughout the following decades among moral fundamentalists: the book got Whitman fired from his job in the Department of the Interior in 1865, and was banned by the district attorney of Boston in 1882.

Despite the mixed reviews, Leaves of Grass would become one of the most influential works of American literature over the course of the next century. And Whitman might have predicted it: “I celebrate myself,” he wrote in the first line of the book. This summer, in the year of the bard’s bicentennial, a trio of exhibitions across New York City celebrates the poet’s life, work and legacy. At the New York Public Library, Walt Whitman: America’s Poet examines the people, places and experiences that most influenced Whitman. The Morgan Library & Museum’s Walt Whitman: Bard of Democracy considers the writer’s evolution over the course of his career. And at the Grolier Club, Poet of the Body: New York’s Walt Whitman highlights Whitman’s formative years in New York, as well as the intimate relationships that shaped both his work and his personal life.

Photograph: The New York Public Library

“I am large, I contain multitudes,” Whitman wrote in Song of Myself. Though rare artefacts, manuscripts, books and photographs culled from private collections, the New York Public Library and the Library of Congress, among others, the exhibits shine a light on the many facets of Whitman.

Whitman spent nearly 30 years of his life in Kings county, where he lived longer than anywhere else. In Brooklyn, Whitman received the only formal education that he ever had, in six years of public school. But the borough and its inhabitants had an indelible impact on the poet, by cultivating his mind outside of the classroom, according to the Whitman scholar Karen Karbiener.

“How does a working-class guy who dropped out of school become America’s greatest poet? Even though he didn’t have an education, Brooklyn gave him a kind of intellectual sustenance,” said Karbiener, who co-curated the Grolier exhibition with the book collector Susan Jaffe Tane.

Whitman passed his teenage years in Brooklyn apprenticed to a printer, and published his first article, The Olden Time, in the New York Mirror when he was 15 years old. Nearly 20 years later, the poet would publish Leaves of Grass (the New York Public Library has Whitman’s personal copy of the first edition of the book), which he wrote “arose out of my life in Brooklyn and New York … absorbing a million people … with an intimacy, an eagerness, and an abandon, probably never equaled”.

The Grolier also showcases a unique bound book containing Leaves of Grass, Passage to India and Democratic Vistas that Whitman inscribed and gifted to the Rome brothers about five months before his death. The poet maintained a decades-long friendship with the pair, whom he felt indebted to for launching his literary career by publishing Leaves of Grass.

“Walt never forgot that favor,” Karbiener said.

Walt Whitman photographed with Nigel and Jeanette Cholmeley-Jones in 1887. Photograph: Alamy Stock Photo

The combination of Whitman’s lack of formal education and various careers – as a printer, publisher, carpenter and journalist, among others – gave him a sense of self-sufficiency, according to Karbiener.

“It gave him this working-class ethic – that mentality of having to do it yourself,” she said.

Whitman was heavily involved with the production of Leaves of Grass: he designed the cover, chose the paper and binding and set some of the type. Later in life, he wrote that he was sometimes “more interested in book making than in book writing”.

But he was also interested in celebrating himself: the Morgan features one of the many “anonymous” glowing reviews he was known to submit to newspapers across the country, proclaiming himself “an American poet at last!” Whitman was also the 19th century’s most photographed American writer: all three exhibitions contain some of the more than 130 photographic portraits of him that exist, many of which were taken in the later years of his life, when he was bearded and known as the “good gray poet”.

Whitman explored sexuality in his writing as he began to explore his desires for other men in his own life.

“He was seen as wrestling profoundly with issues of gender and identity, even though he never used the word ‘homosexuality’,” Karbiener said.

Photograph: Grolier Club

The Grolier show includes the single surviving page of a draft of Live Oak, with Moss, a series of 12 poems Whitman penned in the late 1850s exploring his sexuality. The poet later took the notebook containing the poems apart, and then edited and added them and 33 others to create the cluster of poems that became known as Calamus – named after a phallic-shaped plant – in the third edition of Leaves of Grass.

The civil war, from 1861–1865, became “the very center, circumference, umbilicus, of my whole career”, Whitman wrote. After his younger brother, George, was wounded in combat in Virginia in 1862, Whitman traveled to Washington DC to volunteer as a nurse. Those experiences informed Drum Taps, his 1865 book of 77 poems – including When Lilacs Last in the Dooryard Bloom’d and O Captain! My Captain! – ruminating on both the patriotism and suffering that he witnessed in military hospitals. The Morgan displays an inscribed copy of the book that Whitman gave to his lover, Peter Doyle.

In Crossing Brooklyn Ferry, Whitman hinted at his hope that his work would resonate long after he was gone: “And you that shall cross from shore to shore years hence are more to me, and more in my meditations, than you might suppose.” All three exhibitions show how the poet’s words have remained in conversation with readers across time and influenced other writers worldwide – including those of the Harlem Renaissance and the beat poets – since he died in 1892.

The New York Public Library exhibition includes clips from film-maker Jennifer Crandall’s documentary Whitman, Alabama, which features Alabamians from all backgrounds reading sections of Song of Myself, bringing Whitman’s voice – and their own – alive. The poet would be proud: in the preface to Leaves of Grass, Whitman wrote: “The proof of a poet is that his country absorbs him as affectionately as he has absorbed it.” Two centuries after he sounded his first “barbaric yawp”, Whitman has secured his place in history as America’s poet, according to Karbiener.

“He’s become an American icon, and I think that was a hope of his,” she said.