“M Train,” by Patti Smith. (Knopf)

This year marks the 40th anniversary of Patti Smith’s groundbreaking debut album, “Horses,” a sonic boom still sending aftershocks through music, literature and fashion. Her new memoir, “M Train,” is a Proustian reverie covering those four decades: a magical, mystical tour de force that begins in a tiny Greenwich Village cafe and ends as a dream requiem to the same place, encompassing an entire lost world in its 253 pages.

In her National Book Award-winning memoir “Just Kids” (2010), Smith took readers on a kaleidoscopic journey through the New York arts scene of the ’60s and ’70s that was the crucible for her poetry, drawing and, later, music. She also depicted in heart-rending detail her relationship with photographer Robert Mapplethorpe, one of the most influential creative partnerships of the late 20th century.

As perceptive and beautifully written as its predecessor, “M Train,” for the most part, eschews the straightforward, linear storytelling of “Just Kids.” Rather, it is a more excursive record of a lifelong pilgrim, illustrated by Smith’s own black-and-white photographs, filled with mementos mori and personal accounts of her travels, her artistic obsessions and inspirations. Like her first memoir, this one probes a deep emotional core, as Smith writes poignantly about her marriage to the incendiary guitarist Fred “Sonic” Smith, who died in 1994 at age 45.

Smith recounts trips to Mexico; Reykjavik, Iceland; Berlin; Tokyo; London; Tangier, Morocco; and Madrid, alighting back in the Michigan home she shared with Fred, and after his death, her apartment in the East Village. The book loosely plays off its title, with 18 chapters (and a brief prologue) representing stations in her footloose life.

But don’t read “M Train” expecting revelations of rock-star excess. There are myriad hotel rooms here, but they’re temporary havens where a restless soul finds solace in the work of Jean Genet, Haruki Murakami, W.G. Sebald, J.G. Ballard, Roberto Bolaño, among many others, and also in crime series such as “The Killing” (Smith is a huge fan of detective fiction and TV and is adapting “Just Kids” for a Showtime series.)

In fact, “M Train” is a bibliophile’s trove, with striking insights into the books that ignited Smith’s imagination. Of her obsession with Murakami, she writes, “And then, fatally, I began ‘The Wind-Up Bird Chronicle.’ That was the one that did me in, setting in motion an unstoppable trajectory, like a meteor hurtling toward a barren and entirely innocent section of earth. There are two kinds of masterpieces. There are the classic works monstrous and divine such as ‘Moby Dick’ or ‘Wuthering Heights’ or ‘Frankenstein: a Modern Prometheus.’ And then there is the type wherein the writer seems to infuse living energy into words as the reader is spun, wrung, and hung out to dry. Devastating books.

In “M Train,” the path of Smith’s own trajectory is marked by recurring visions of a laconic cowboy, who may remind some readers of Sam Shepard, her former lover and collaborator on the play ­“Cowboy Mouth.” She also describes a series of remarkably lucid dreams and her decades-long, globe-spanning quest for the ideal cafe and the perfect cup of coffee, her drug of choice.

Sometimes, Smith comes across as a modern flaneuse, combining a ­photographer’s ­visual acuity with the boulevardier’s appreciation of the ephemeral, pointillist details that create the sprawling canvas of a peripatetic life. Other times, she is an amused participant-observer, as in her droll account of her tenure in an obscure club whose 27 mathematically and geologically inclined members are identified by their numbers (Smith is No. 23). They meet once a year to honor the memory of the German scientist Alfred Wegener, who proposed the theory of continental drift.

Mostly, however, she comes across as a lover: of literature, of art and music, of her children and late husband; of her parents and siblings, friends and mentors, many of whom have died. There’s an elegiac tone to much of “M Train.” Smith visits the garden of Schiller’s summer house, sets out to channel the final moments in Wegener’s life and lays flowers at a memorial for the filmmaker Akira Kurosawa. She searches for the graves of the writers Ryunosuke Akutagawa and Osamu Dazai, both of whom killed themselves, and then she continues her “run of suicides” with a pilgrimage to Sylvia Plath’s tombstone. “Death by water, barbiturates, and carbon monoxide poisoning,” Smith muses; “three fingers of oblivion, outplaying everything.” In 1997, two years before his death, she visits the elderly Paul Bowles in Tangier:

“ ‘Paul, I have to go. I will come back to see you.’

“He opened his eyes and laid his long, lined hand upon mine. Now he is gone.”

There is also a heartbreaking account of Fred Smith’s death, followed soon after by that of her beloved brother, Todd. Shortly after, she buys a tiny bungalow in Rockaway Beach in Queens, an area that is then devastated by Hurricane Sandy. Yet despite all of these losses, there is extraordinary joy here, too. Smith’s bungalow survives the storm, and her own journey continues, illuminated by her openness to the world and her compassionate, questing spirit. “The transformation of the heart is a wondrous thing, no matter how you land there,” she writes. “Oh, to be reborn within the pages of a book.”

Readers who share in Smith’s transcendent pilgrimage may find themselves reborn within the pages of this exquisite memoir.

Elizabeth Hand’s latest novel, “Hard Light,” will be published next year.

On Oct. 9, Patti Smith will read at George Washington University. For tickets, contact Politics and Prose Bookstore at 202-364-1919.

M Train

By Patti Smith

Knopf. 253 pp. $25