In 1956, Beat poet Allen Ginsberg was hitchhiking near Carmel, Calif., when he passed a wooden sign that marked Edward Weston's home. So the young Ginsberg dropped in unannounced on one of the world's most famous photographers, by then in his late 60s and ill with Parkinson's disease. Weston was polite, showed Ginsberg some photographs, and then ushered him out, saying, "Don't forget. I was once a young bohemian like you, too."

It was a poignant comment, and it made a powerful impression on Ginsberg, whose cultural stock was quickly rising after his legendary 1955 recitation of "Howl" at San Francisco's Six Gallery. Perhaps photographers have a keener sense of aging, given how remorselessly the camera collects evidence of decay over the years.

Aging haunts many of the photographs that Ginsberg took in his lifetime, especially those he began making in the 1980s while trying to build a reputation in the art world. Wandering through the fascinating but not always convincing National Gallery show "Beat Memories: The Photographs of Allen Ginsberg," you have a sense that the poet-photographer saw the skeleton under the skin from an early age and dramatized mortality well before it came knocking on his door.

William S. Burroughs, from whose mental cloaca flowed "Naked Lunch" and other delights, was a frequent subject of Ginsberg's lens. Even when he was young, the cadaverous Burroughs looked a few steps from death's door.

Ginsberg also turned his camera on his own family, photographing his grandmother in 1953, with a diaphanous white curtain behind her. Born in Russia in 1869, the elderly Rebecca Ginsberg looks as if her waning spirit is about to be subsumed or dissipated into the mysterious white light flowing through the window.

In a 1961 photograph of Burroughs in Tangiers (with poet Gregory Corso and composer and author Paul Bowles), there are also two sylphlike boys, just past adolescence, crouching in the background. One stares at the ground, while the other looks the viewer straight in the eye. In a densely packed scrawl, written on the image decades later, Ginsberg calls the boys "shades" and tells the viewer that they both died young.

He couldn't know that at the time he made the image, of course, but someone clearly staged the photograph to put the lads in the shadows, as if to say that youth is servile before art, or that art needs to keep its distance from unformed minds in beautiful bodies. Whatever Ginsberg may have intended, it's a striking image, and it argues implicitly with the idea that the Beats were merely a youth movement, a moment of sexy counterculture, fueled with libidinous energy.

Ginsberg's photographs seem part of a larger effort to construct and analyze family, which is not necessarily what one would expect from a photographer whose celebration of homosexuality was so exuberant and detailed it can bring a blush to the cheeks of today's two-kids-and-a-dog gays. The early photographs were obviously part of his energetic self-mythologizing of the Beats, especially those he took of Jack Kerouac, for whom Ginsberg's torch always blazed with embarrassing brightness.

But many of the images were also carefully constructed little dramas -- family dramas -- such as one that shows Burroughs camping it up with Kerouac as the two men sit on a shabby sofa in the glare of three naked light bulbs.

In a strange way, Ginsberg was always a family man. For every angry poem, every rant against authority such as the 1966 poem "Wichita Vortex Sutra," Ginsberg penned something more intimate. He eulogized his mother in "Kaddish" and, later, his father in a 1976-78 poem "Don't Grow Old": "We toweled him dry, arms under his, bathrobe over his shoulder -- ." The "we" in the poem is Ginsberg and his troubled lover, Peter Orlovsky, tenderly doing family duty like a married couple.

Ginsberg's photographs extend that sense of family to his larger circle, capturing with remarkable courage the aging of his early comrades. His friend Corso, whom he photographed in Paris in 1956 dressed like a virile shepherd, is seen again in 1995, looking like an auto mechanic who just finished a long night shift at some 24-hour gas station.

Death was an explicit presence as early as 1964, when he photographed a broken-down Kerouac.