There are many reasons to visit the Brazilian state of Maranhão. Guarana Jesus is not one of them. This fizzy, bubblegum pink drink makes Irn Bru taste like sparkling mineral water. Despite the hint of natural goodness in its name - guarana is an Amazon 'energy fruit' - and of spiritual nourishment too, I have never tasted anything so tooth-rottingly sweet or artificial. Here in the far north of Brazil, where dazzling salt pans and sandbanks skirt the Atlantic coastline, it outsells Coca-Cola. 'If you start young, you get used to it,' said Dino, my guide, as he flicked open another can.

We were sitting in a restaurant in Barreirinhas, the nearest town to the real reason for my visit to this remote part of Brazil. Lençois Maranhenses translates as 'the sheets of Maranhão' and refers to a billowing, Persil-white desert which stretches 140km along the coast. During a five-year stint living and working in Brazil as a foreign correspondent I travelled the length and breadth of this vast country but this sun-kissed outpost eluded me, despite its reputation as the most otherworldly of Brazil's many dramatic landscapes. Its existence, according to Dino, is something even geographers are unable fully to explain.

Tucked between the Amazon forest and the popular beaches of the Brazilian north-east, Maranhão has long been overlooked by tourists. This is changing as Brazilians - constricted by a weak currency - rediscover their own country and foreigners take advantage of increased flights to northeastern cities like Recife and Fortaleza. I flew via Lisbon into Fortaleza, from where it is just a short hop to São Luis, the state capital of Maranhão.

The first road between São Luis and Barreirinhas - an isolated fishing town now reinventing itself as the gateway to the Lençois - opened only two years ago. Even now the drive takes three hours, but I could tell that Barreirinhas was changing fast. Workmen were paving its dirt streets and Dino told me proudly that there was now a pizzeria.

The final stretch to the Lençois national park was a four-wheel-drive adventure. Our Land Rover bumped and jerked along trails of fine sand as we snaked through groves of cashew trees. Eventually we reached the foot of a 30-metre dune rising above the forest canopy. It had taken an hour to travel 10 miles. We scrambled up the dune using a rope that was hanging down it. It was early afternoon and the sun was beating down from a cloudless sky. A few steps over the top and I saw the Lençois for the first time.

It was hard to believe I was still on Earth, let alone Brazil. Before me stretched a pristine canvas of enormous white sand dunes dotted with silvery lakes. The scale of the place, the geometrical patterns, lines and curves of the dunes sculpted by the wind, and the lakes like puddles of sky, created a landscape that was at once immaculate and unnatural.

As we trudged across the sand, feeling like discoverers of a strange new world, the wind rubbed out our footsteps like an obsessive-compulsive host instantly erasing any signs of human disturbance. The sand was as fine as flour and there were no trails, paths or any sign that anyone had ever set foot here before.

For six months a year, from January to June, it rains heavily on the Lençois and the valleys between the dunes fill up to form freshwater lakes. They gradually evaporate during the following months. The most beautiful time to visit is between July and September, before the water level has dropped significantly and when the lakes are warm, crystal clear and full enough to swim in.

'No one is sure why the Lençois are here,' said Dino, 'although it is likely to be an effect of the unusually large tide margin along the Maranhão coast. The sand on the beaches gets especially dry and the high winds blow it for miles inland.'

The Lençois cover an area the size of Surrey and contain other unresolved phenomena. As I waded in the lakes I could see tiny fish. How do they get there if the lakes dry up every year? 'Either they have found a way of living in the sand or they are brought in the beaks of passing birds,' replied Dino. 'But the truth is, nobody really knows.'

For several hours we trekked barefoot through the undulating dunes. It was hypnotic to watch the shifting sands create endless moving patterns on the ground, like speeded-up satellite weather pictures of gathering clouds. The wind also demonstrated the inappropriate design of the locally made wide-brimmed straw hats. It was a constant battle to stop mine flying off.

Walking the Lençois is tiring because of the relentless sun, wind and yielding sand. The next day I took a much more relaxing day-trip from Barreirinhas down the River Preguiças to Caburé. The boat journey took an hour and passed mangroves and stretches of white sand. Caburé is a tiny fishing village on a spit of land where the river joins the sea. We ate fried fish at Pedro's restaurant and stretched out in one of the hammocks that he had lined up in the shade of an adjacent shack. The beach was empty and the sea looked calm. It was a perfect hideaway.

To get to the Lençois you must go through the city of São Luis. Located on an island in a deep bay, it is historically unique since it is the only city in Brazil founded by the French. I had hoped to find some trace of their presence, but they were only there for three years, from 1612-15, and São Luis is possibly the most Portuguese-looking city in Brazil.

This former slave port, which has managed to hang on to much of its African culture, is often thought of as the poor relation in the trio of historic north-eastern cities that also includes Salvador and Olinda. (The three have been designated a joint world heritage site for their architecture.) Yet the old quarter of São Luis is prettier than Olinda's and much more relaxing than Salvador's Pelourinho, which is always thronging with drummers and street hawkers.

Many of the old colonial-era buildings are clad in colourful French and Portuguese tiles. As the sun goes down and the replica antique street lamps come on, it feels less like Brazil and more like a dream of old Lisbon.

At night the bars play two sorts of local music, bumba-meu-boi - a percussive folk style from the annual cattle festival (in which locals dress up in extravagantly embroidered pantomime cows) - and reggae. São Luis is the heart of the Brazilian reggae scene, supposedly the result of Caribbean sailors passing through, and Sunday is reggae night with open-air parties that last until dawn.

For now, Maranhão offers visitors a taste of Brazil off the beaten tourist track. But that is changing. To preserve the pristine landscape of the Lençois, the authorities are having to limit visitor numbers. Each of the two entrance points near Barreirinhas will soon allow only 100 people per half day. It's a drastic measure but one which should preserve this unique environment for future generations. I'll raise a glass of Jesus Guarana to that.