The Collyer brothers were a pair of congenital pack-rats who amassed 130 tons of rubbish at their New York mansion. They collected banjos and baby carriages, plaster busts and bowling balls, organs (both musical and human) and the chassis from a Model T Ford that they installed in the basement and ran as a generator. When the house filled up there was no room for the brothers. Langley was eventually killed after blundering beneath an avalanche of his own domestic clutter. Homer, blind, infirm and unable to fend for himself, died from starvation a few days later.

EL Doctorow's beguiling 11th novel curates the basic facts of the Collyer history, but it also mounts a major refurbishment. Homer and Langley extends the time-frame and refits the details. The family home is shunted about 50 blocks south, from deepest Harlem to the Upper West Side. Instead of perishing in 1947, the Collyers survive to the late 1970s. Doctorow lets light and air into these musty chambers. He has his hermits variously buffeted and seduced by outside forces. The doors are bolted and the windows are shuttered, but the 20th century crawls in through the cracks.

Our narrator is Homer, the younger son of a well-to-do family who loses his sight as a teenager, standing in Central Park as the skyline fades out all around him. His brother Langley is similarly pointed towards darkness, except that this is a darkness he runs at eagerly and mistakes for illumination. Gassed in the trenches of northern France, Langley returns with his lungs in tatters and his head buzzing with a "Theory of Replacements" – a kind of cosmic quota system in which time "advances through us as we replace ourselves to fill in the gaps". In order to expose this shadowy truth, Langley begins hoarding press clippings with the aim of collating the ultimate news digest in which every strain of story (earthquake, plane wreck, love scandal) is enshrined for posterity. His ambition, he explains, is to create an "eternally current dateless newspaper"; to catch the world in a bottle and place it on the shelf.

Events, however, have a way of complicating this theory. Doctorow shows how each decade leaves a distinct thumbprint on the siblings, to the extent that one starts to regard them as an unwitting index of changing times in America at large. Homer consorts with prohibition-era gangsters and hosts tea dances during the depression. In the 1960s the Collyers let their hair grow long and their clothes go shabby, only to find themselves adopted as kindred spirits by the peace protesters in Central Park. American history knocks noisily at the door and its emissaries drift in and out at intervals, seldom to return.

After allowing a menagerie of hippies to stay at the house, for instance, Homer leads his guests in a jubilant conga through the darkened corridors: "And when I reached the front hall and lifted off the two-by-four dead bolt and opened the door, they all flew past me like birds from a cage . . . and I heard their laughter as they fled across the street and into the park, all of them, including my brother, though he would come back, but the others, never, their laughter diminishing through the trees, for that was the last of them, they were gone."

This, it transpires, will be the Collyers' final bash. Afterwards, Langley turns increasingly paranoid and the house is overrun by rats. Homer, meanwhile, has gone deaf and now hunches over a Braille machine writing his memoirs for a French journalist, whom he has met once or maybe twice, although the second encounter is almost certainly a hallucination. His mind plays tricks; he's lost his bearings. "There are moments when I cannot bear this unremitting consciousness," he laments. "It knows only itself." By the end, his only reminder of the outside world comes when Langley materialises to trace a line on his forearm; one for every rat he's killed.

Doctorow built his reputation on bold, expansive historical fictions such as Ragtime, World's Fair and The Book of Daniel. But Homer and Langley is melancholic and minor-key; a sly inversion of his old concerns. One might regard this as a novel of old age in which the Collyer mansion is installed as the physical embodiment of human consciousness; a vessel of memories that becomes congested and precarious as the years go by. By implication it could also represent America itself. Doctorow takes the great spread of 20th-century history and reduces it to a huddled mass of dusty souvenirs.

Apparently the real-life Collyers were descended from the pilgrim fathers, tracing their ancestry right back to a boat that docked a week behind the Mayflower. Was their eventual retreat a repudiation of that noble pioneer heritage? Or was it, perhaps, a bizarre twist on the whole notion of rugged individualism? Homer and Langley Collyer grew up in a land where the frontier was finished and the wilderness was settled. So they journeyed inward as opposed to outward and forged a lonely nation within four walls.