Seventy years ago Albert Camus published the novel known in English as The Outsider: a short and vivid monologue that – I remember this from school – doubles as some kind of philosophical manifesto. The narrator, Meursault, is a French Algerian whose mother is reported dead in the famous opening sentence; later, on a beach, he will murder someone – an Arab, as the song by the Cure reminded us in 1979 – for almost no reason.

Ben Lerner's remarkable first novel is narrated by a different kind of outsider: a young American living in Madrid on a poetry scholarship in 2004. Adam Gordon suffers frequently from linguistic dislocation and – permanently – from bipolarity which he self-medicates with a cocktail of prescription drugs, coffee, nicotine, booze and marijuana. Meursault is trapped in the sun-dazzle of the moment. Adam drifts, benumbed and stoned, through a Madrid that sometimes fails to match the depths of his self-absorption: "I left the hotel and walked into the sun. Or was it cloudy?" And yet the apprehended city floats before the reader with a limpid and oneiric grace: a self-portrait in a constantly distorting mirror. Young couples are seen "displaying their mutual absorption on nearly every bench"; Adam and a girlfriend see themselves "reflected vaguely in the silver of passing buses."

Bewildered, lacking motivation, filled with tides of rage that never manifest themselves in action, he becomes part of the art-poetry-stoner crowd. When chunks of Spanish conversation become hard to follow he zones out, leaving his face to enact the role of involved listener and participant. This doesn't always work; early on that face gets punched for smiling while a young woman, Isabel, is telling a tragic story. Later, when they are romantically involved, he tells Isabel that his mother has died and that his father is a fascist and bully. There's a logic of self-pitying ingratiation at work here; after all, he reasons, hasn't every Spanish movie since 1975 been about "killing, literally or symbolically, some pathologically strict, repressed, and violent father"? That his mother is alive and his father the "gentlest of men" is irrelevant. If Meursault was marooned in a realm of absolute sensual truth Adam says whatever swirls into his head in any given situation, often turning linguistic fallibility into vatic profundity. His pronouncements have the same relation to the verifiable world as a poem by John Ashbery (from whom Lerner takes his title). The best of these poems, Adam decides, "describe what it's like to read an Ashbery poem; his poems refer to how their reference evanesces. And when you read about your reading in the time of your reading, mediacy is experienced immediately." A number of crazed essay-reflections like this, on poetry and art, flow through the book.

Which starts with Adam visiting the Prado to stand in front of Roger van der Weyden's Descent from the Cross, hoping for "a profound experience of art" that never takes place: "The closest I'd come to having a profound experience of art was probably the experience of this distance, a profound experience of the absence of profundity." Situation and rhythm – those hypnotic, self-cancelling repetitions are a feature of the novel – are reminiscent of the opening of Old Masters by Thomas Bernhard (a surprising but important influence in current American fiction).

Camus, Ashbery, Bernhard… It's the familiar paradox whereby a genealogy powerfully suggests itself in a work so luminously original in style and form as to seem like a premonition, a comet from the future. Other testimonies in this line of alienated descent might be Knut Hamsun's Hunger, Fernando Pessoa's The Book of Disquiet and – bringing us back to America – Walker Percy's The Moviegoer. Percy's narrator is preoccupied by "the search", by "what anyone would undertake if he were not sunk in the everydayness of his own life. This morning, for example, I felt as if I had come to myself on a strange island." Lerner's narrator is so not-himself, so at sea in the un-everydayness of everyday life in Spain, that, having stepped outside for coffee during a trip to Barcelona, he spends 12 hours trying to find his way back to the hotel. "I felt like a character in The Passenger, a movie I had never seen. When I resumed my search…"

I point out the tracks of these earlier narrative guides confidently and inconclusively; they seem obvious to me but it's quite possible they played no part whatsoever in the gestation and composition of Lerner's novel. What they share, however (with the lyrically earnest exception of Camus), is a devastating humour. Gales of laughter howl through Leaving the Atocha Station. It's packed full of gags (Adam is convinced that Ortega y Gasset is two people, like Deleuze and Guattari) and page-long one-liners itemising the narrator's ghostly immunity to normal human relations. Adam is a repellent figure ("I imagined breaking the bottle over her head….") or would be were it not for the self-lacerating ("…then raking my throat with the jagged glass") consciousness of that awfulness. Spanish friends tell him he's a talented poet; he knows he's just "a bit player in a looped infomercial for the damaged life". Hostile to his fellow Americans, especially those seeking to avoid their fellow Americans, Adam concludes that "nothing was more American, whatever that means, than fleeing the American, whatever that is, and that [this] soft version of self-imposed exile was just another of late empire's packaged tours". As in Bernhard, the twists, surges and reversals of intention generate a propulsion routinely provided by characters and plot. As with the Ashbery poem, the novel is self-captioning, a dramatised commentary on the experience of reading it: "I came to realise that far more important to me than any plot or conventional sense was the sheer directionality I felt while reading prose, the texture of time as it passed, life's white machine."

This, needless to say, will not be to everyone's taste. Otherwise sympathetic readers will struggle to tell apart the two beautiful women with whom Adam is involved: both intensely desirable, and both possessed of a limitless capacity to indulge the solipsistic poet-fraud in their midst. When the Atocha station is bombed by al-Qaida, Adam tells himself that "History was being made and… I needed to be with Spaniards to experience it" but the subsequent demonstrations and vigils serve mainly to confirm a disassociation that, while extreme, remains an unorthodox investigative tool. After the attacks, with the election of Zapatero imminent, an activist tells Adam that he has been "up all night protesting and partying. I asked if those were the same things, protesting and partying." The question is not asked maliciously and the book never feels like satire. What is does feel like is intensely and unusually brilliant. Beyond that, I don't know quite what it is – and I like it all the more for that. It was first published in the US by Coffee House Press, Minnesota, which deserves the loudest possible praise for its initiative and success in doing so. Editors at the big, corporate houses must be kicking themselves.