Sundown in the desert. I walk out under a stained-glass sky. Carmine, indigo, amber, and a pale, sweet green move through the sky in soft and overlapping bands, sinking to the ground as if spent, slipping behind the mountains with the last of the day’s light.

I’ve been travelling a long time. I feel distant, lightheaded, my faltering progress increasingly taking on the dizzying significance of a dream, in all its heavy-handed imagery: driving fractured roads past vacant lots, boarded houses, the basins of marinas emptied of water, and — having pulled up and left my rental car askew across the road — I stagger down between the arms of two twin piers that loom impotently over a dust-dry landscape.

Somewhere out there, I know, are the silvered remains of a sea, a sea in the process of simmering away, leaving only a pale shadow in its place. The silt here wears a hard rime of salt that gives way as I lower my weight on to it, like sun-crusted snow. As I get further out, my feet sink deeper into the thin, grey sand.

When I look closer, I see it is not sand at all, but the dry bones of fish, pounded into shards, and the tiny, skull-like husks of barnacles. This is a foul place. The air is thick with brine and guano and decomposition. Even now, in the violet dusk, the heat is oppressive. But as I cross the crystallised flats, the water gleams into view, an impossible sea in the middle of the desert.

The Salton Sea is not a true sea, but the vestige of a great flood: the consequence of the Colorado River breaching the banks of an ill-built irrigation channel in 1905. The floodwaters were a near unstoppable force that carved deep gorges into the loose desert soils and created a waterfall 80ft high that eroded its way backwards through the basin floor at the rate of a mile or more per day. The waters rose and rose, filling the valley like a bath and creating an inland sea 35 miles long and 15 miles wide.

The residents turned out in their hundreds to watch the deluge as it swallowed first their fields and then their homes. Though dramatic, the arrival of water in a region once known as “the Valley of the Dead” was not entirely unwelcome; “while naturally such an unexpected turn has caused a great deal of inconvenience,” commented a local paper, “the flood will really prove a great benefit”.

And so it transpired. By the 1950s, the accidental sea had bloomed into a popular resort, rechristened the “Salton Riviera”. An hour’s drive from the upmarket nightclubs and golf courses of Palm Springs, the Salton Sea offered a yacht club, motels, water-skiing, and — after the waters were stocked with shad, orangemouth corvina and striped mullet — sport fishing. For a time it saw more visitors annually than even Yosemite National Park. It was, as one ad hailed it, “truly a miracle in the desert”.

Map of California

But the miracle was short lived. The sea began to shrink, revealing an expanse of heavy, clay-like sediment, which itself dried to a thin, alkali powder laced with selenium and arsenic and DDT from the agricultural run-off that had been diverted into the sink to slow the sea’s evaporation. Blown up by the desert winds, the whole region became a dustbowl, the toxic residue triggering an asthma crisis across southeast California.

As the fish died, the birds that fed on them disappeared too, or worse — died off themselves. When high winds stir up the anoxic waters at the lake bed — full of all those decomposing fish and rotting mats of algae — they turn the water a gaudy green, releasing large quantities of hydrogen sulphide, a lethal toxin with the stench of rotten eggs. Today the lake covers 325 sq miles, having shrunk by about 50 sq miles since the turn of the century; the Pacific Institute predicts the volume of water will decrease 60 per cent in the next decade.

Altogether, these symptoms of environmental collapse add up to the atmospheric setting of a post-apocalyptic graphic novel: the toxic dust; the swirling, pigmented sea; the neurotoxic algae; the fishbone beaches; the dissolving seafront trailers sinking into the mud, the jetties launching out into nothing. Except: it’s real, it’s here, and it’s only getting worse.

I came to the Salton Sea as part of the research for a new book about the ecology and psychology of abandoned places, an investigation into how nature can adapt and recover in the long shadow cast by human activities. It had taken me to some of the world’s most eerie, ravaged and polluted sites — from the disaster zones of Chernobyl and Montserrat, to former frontlines in Cyprus and Verdun, Detroit’s blighted neighbourhoods and a Scottish island whose last residents left in 1974. The Salton Sea — its seaside resorts left landlocked by shrinking waters, its boats rotting in the bowls of dry marinas — felt a fitting final destination.

Seven miles east of the Salton Sea lies an abandoned military base dating from the second world war. Camp Dunlap featured 8 miles of paved roads, a swimming pool, water tanks and about 30 buildings. When the Marines vacated the site after the war they took the buildings with them, leaving only the foundations. Now they call it Slab City. Since the 1960s, this place has served as the site of a makeshift desert camp of dropouts and drifters, hippies, artists, outlaws, runaways, survivalists — a haven or a hideout for those who have no home, or carry their home on their back, or have burnt their homes down.

It’s busy here in winter, when snowbird pensioners in expensive rigs tumble through, a thousand at a time, looking for a free place to park. But when the heat amps up in summer, as high as 50C, with no access to running water or power or sewers, they pack up and drive off.

I get here in September at the end of a long, relentlessly hot summer, when only the residue, the hardcore, the true faithful, remain. It’s squalid and ugly, but there’s a raw splendour to the place too. Here and there, the heaps of refuse have been fashioned into works of art. There’s a maze constructed of stones, piled into thin spiralling paths; a stripped-down car, propped up on bricks and with its bonnet gaping, ornamented in a thousand bottle caps like a pearly king.

Broken shards of mirror have been mosaicked back together to form a refractive, disconcerting whole. Its residents call it, fondly, “the last free place in America”. But it doesn’t feel like a hangover from some untroubled past. If the slabs the squats are built on are souvenirs of the atomic age, then Slab City itself seems a vision of a post-atomic future: a hardscrabble society cobbled together from the ruins of a fallen civilisation.

“Welcome to the Slabs,” says Sam when I arrive. He’s been minding the Slab City “hostel” over the summer in return for a place to live. I’m the only guest. Sam’s in his late forties, maybe early fifties, heavyset, wearing a tie-dye shirt and an elasticated skirt — for the heat, he says, which is oppressive. Not long ago, he lost just about everything he owned in a fire. He gets a bit of money from the state thanks to his disability cheque, but it’s not enough to live on anywhere else.

To the south rises the Slabs’ most famous landmark, Salvation Mountain — a hill-sized sculpture-cum-landform-cum-place of worship built of adobe and haybales and painted in bright Sgt Pepper colours by the late, great outsider artist, Leonard Knight. GOD IS LOVE, it declares in huge bubble letters rolled from clay. REPENT, it instructs. REPENT NOW. A crucifix sprouts from its summit like a beanstalk. As disconcerting as it is striking, Salvation Mountain is the work of a beautiful, unhinged mind: the work of an unlikely prophet who came to the wilderness, like so many before him, in search of God. Salvation Mountain promises forgiveness, unconditional love, in the place that needs it most.

I’d heard there were hot springs at the Slabs, but Sam warns me off. They’re hot, he points out, not unreasonably: the last thing you need when you’re already light-headed and sun-sick. But Sam says he has an alternative plan. We get in my car and he directs me along a long gravel track behind the camp to where the clear waters of the Coachella Canal flow fast through a V-shaped concrete channel, water destined for the swimming pools and golf courses of Palm Springs. I haver for a moment when I see it. It doesn’t seem real. All week I’ve been fending off the false flags of mirage as I travel through the desert: shimmering visions of flooded roads that retreat upon approach, and the floating islands of Fata Morgana. But this is real. Cool, pure, fast-flowing water.

I drop my grimy dress to the dirt and jump in near a ladder, which I use to anchor myself against the current. DANGER, reads a sign, but in my heightened state, the underlying risk seems only to intensify the experience: the water so clear, so turquoise, so temperate. Tiny fish shelter under the ladder rungs. Catfish sweep the smooth concrete bottom. The sky is so cloudless it appears black when I look up. I feel dizzy if I do, as if peering over the edge into a bottomless gorge.

I think of a woman I met earlier, Ella. She moved to the Slabs for health reasons: chronic pain and the OxyContin addiction that came after. But she felt reborn in the desert, in the hot, dry air. She said she’d never go home. I think I know how she feels. I am baptised, wiped clean. Sam takes a running jump, and strikes out in a stiff front crawl, angled into the current so that he cuts across to the ladder on the opposite wall. He grabs a rung, and hauls himself to safety. Heaving himself half out of the water, he throws his head back and crows like Peter Pan, a wild ululation. Then he laughs: he hasn’t had a shower since July. No matter. The rich are drinking our bathwater now.

Later we end up in the library — a shack-like structure built of repurposed wood and corrugated sheets, half-open to the elements. It’s a beautiful concept — dreamed up and staffed by public-spirited Slabbers from their own resources — but nevertheless the space has a dusty, passed-over atmosphere: the books are stacked tightly, spines bleached, pages swollen. A thick felt of grime covers everything, like a lost library from centuries ago. In one corner, there’s a cylindrical stack of aged encyclopaedias with a spray-paint label: GOOGLE. If anyone has the skills to survive some unspecified global disaster, they are likely to be found among the residents of Slab City, who are living now as if the end times have already come.

The overwhelming aesthetic — partly self-aware, but largely through necessity — is of a post-apocalyptic wasteland with a Mad Max vibe, where buildings and machines fallen into disrepair have been cannibalised and then cobbled back together. In recent years, popular culture in the west has been increasingly dominated by dystopian visions, both in cinema and in literature, including a rise in so-called “cli-fi” — fantastical visions of climatological disaster, which echo real-life anxieties over the impact of man upon the planet. And it’s impossible not to see parallels in the most vociferous of climate change literature: there too we find that sense of impending disaster, of divine retribution for past sins, the urgent need to act before it is too late.

In the library, three topless men sit at a table, shooting the breeze. One quivers a cane that produces a noise like a rainstick — the rattle from a rattlesnake’s tail has been cut off and pinned to it. He had got up in the night and found it, “sitting waiting for me in the middle of the floor in the dark. So I shot it.” He stands up and fetches a board where the snake’s skin has been stretched out to cure. What happened to the rest of it, I want to know. He ate it, he says.

Another man at the table is younger, fresh-faced, with a look of bland good humour. He says his name is “2K”, and got here at the start of the summer after some time on the road. Before he left home, he’d been working — of all things — at a doggy daycare facility, but one day he realised he couldn’t do it anymore. “I was tired of the whole Babylon thing,” he tells me. I shake my head. Babylon? Babylon, he says again. The outside world. People working all the time. Working to live, living to work. So, he opted out. He quit. He packed everything he owned into his truck and set off. In the end, he washed up here. He slept under a bush a few nights before he got here, he says. Now he sleeps under a tree. “I’ve gone up in the world,” he says, and it’s a joke, but it’s also for real.

“Here in Slab City we have a tremendous advantage,” says 2K. “All the trash from Babylon.” I look at him quizzically. He’s not being humorous. “So much trash accumulated in the desert over the years it became a resource. Everything we have here has been built out of trash.”

Babylon, to 2K, is all modern civilisation: the great polluting monolith from which they live downstream, picking through the waste spewing from its exhausts. It is a chaotic, careless place of inconstancy and disappointment that squeezes its workers dry and then deserts them. The people who end up here come partly from choice, in a quest for a different way of life, and partly because they have nowhere left to fall. Slab City may be an abandoned, trash-strewn hinterland, but at least the rent is free.

Islands of Abandonment: Life in the Post Human Landscape by Cal Flyn is published by William Collins on January 21

Follow on Twitter to find out about our latest stories first

Listen to our podcast Culture Call, where FT editors and special guests discuss life and art in the time of coronavirus. Subscribe on Apple, Spotify, or wherever you listen