Booker Prize-nominated novelist Philip Hensher travels to Taiwan for the annual Dragon Boat Festival and uncovers a land of myths, tradition and ceremony.

The lake was high in the mountains of Taiwan. The hills were lush with jungle, green and dense as spinach, and the humidity in the air was overwhelming; a few metres above the lake, wisps of cloud were forming in the soupy air. From time to time, the crack of a starting pistol sent a scribble of smoke upwards from the jetty, and two brilliantly coloured boats, dragon headed, pushed out to the beat of a drum. The Liyu Lake Dragon Boat Festival was running through the competitive heats.

On the lakeside, festive stalls had taken root; families were sitting stolidly on stools under umbrellas, the best spectator spots long taken. From time to time, the parents dispatched their children to fetch bags of tiny shellfish, spatchcocked squid from the grill, malodorous 'stinky tofu'. The teams waited their turn; 14 alarmingly fit young men from the local fire brigade, whose spectacles and general air of thoughtfulness gave them the semblance of intellectual revolutionaries, went through their rituals.

'Esther! Esther! Esther!' they chanted, their arms about each other's shoulders. Another team, on the jetty, jerked their torsos back and forth in synchrony, as if in high-speed Islamic prayer. The waiting teams getting a pep talk stood relaxed and confident, their bare feet apart, shouting 'Ha!' from time to time. This was a serious business. 'Who is Esther?' I asked. 'I think they're saying "Extra",' my guide said.

There are three important festivals in the Chinese calendar: the New Year; the Moon Festival and the Dragon Boat Festival. The Dragon Boat Festival commemorates an incident that took place in Jiangxi province in mainland China in 278 BC. A righteous court official, Qu Yuan, was falsely accused of crimes by the emperor, and drowned himself. The people are said to have thrown balls of zongzi (cooked rice) into the river to discourage the fish from eating his body. From this touching story, the boat races and the festival arose. The rituals and traditions surrounding the boat races are, for historical reasons, better preserved in Taiwan than anywhere else, including China. Traditional food, such as zongzi is served; the boats are carved by hand, much as they always were.

Taiwan, unaccountably missing from the usual Western tourist's mental map of Asia, is a curious sort of country. For a start, this medium-sized island confusingly refers to itself as the Republic of China, though it is not recognised as a state by many other countries. Its modern history begins with the flight of the Chinese Nationalists before Chairman Mao's communist forces in 1949. In their flight, the nationalists under Chiang-Kai Shek took historical treasures, including most of the contents of the Forbidden City in Beijing - the National Palace Museum in Taipei is an astounding collection of hundreds of thousands of treasures. Subsequent events in mainland China inadvertently turned Taiwan into a repository of traditional expertise and history. During Mao's Cultural Revolution, many historical treasures left behind were destroyed; much traditional craft was lost; and festivities, such as the Dragon Boat Festival, were abandoned. Nowadays, mainland China has tried to reinstate its links with the past, but it is too late, and most of the boats raced in mainland China during this festival are cast in fibreglass. Taiwan sustained an unbroken link with the past, and in its festivals, a nationalistic pride in this fragile country is to the fore.

High in the mountains of Taiwan, Lee Luan-Fu, the wife of a tea plantation owner, poured me a cup of tea. It was a lengthy process. She boiled a kettle, then half-filled a tiny teapot. She measured out dry tea into a bamboo pipe with a sort of chopstick; she emptied the pot into a tea bowl. Every implement had its rest and was respectfully returned to it after its use. The tea was added to the pot, then hot water. The tea was poured, after resting, into a small pitcher, and later poured into a cup, which she rested carefully on a towel. The contents of the cup were poured into the tea bowl and offered up for me to smell. She poured a second cup and now, finally, I was permitted to drink it. All around, the rolling hills were covered with neat rows of tea, looking from a distance like corduroy in racing green; tiny figures bent and picked with deft expertise. Carried out without self-consciousness, it could have taken place at any time in the last thousand years.

We were in a traditional world. A visitor from Tapei quietly told me there were no women owners of tea plantations - 'That would be absolutely impossible.' Over a dinner of a chicken impaled and roasted on a spike, its head still attached, with fiddlehead ferns and whole sprouting peanuts, the owner of the plantation put a different angle to me: 'Picking tea - it's women's work - it always has been. Men only do it when they can't find other work. Women like to talk among themselves about women's subjects.' It all sounded rather jolly, but, as in other areas of endeavour, young people were moving away, to be replaced by immigrants, and most of the Taiwanese women picking tea were elderly. In the fields, a walnut face under a conical coolie hat gazed at the foreign visitor. The traditional way of life was still making a good living for the owners up here: to win first prize in a tea competition could mean that the tea fetches half a million Taiwanese dollars a kilo (£10,500).

Elsewhere, traditional ways of life, still beautifully and scrupulously pursued, seemed to be under threat. Lukang is a town rich in culture; the sumptuous decorative overload of its Taoist temples attracts worshippers praying for good luck, business success or marriage. Around them, craftsmen still work. In woodcarver Li Bing-Gui's workshop, a magnificent gilded dragon altarpiece sat waiting to be transported to the village of Kaoshong. He explained to me that its extraordinary fluid effects were worked in the hardest of woods - he was proud of his technical feat - before telling me his story. 'I'm the fifth generation of woodcarvers in my family. My father worked much more in the temples - most of my clients are private art collectors. We've inherited Chinese skills - my family came from the mainland. But in China there is no market for my work. Thirty years ago, concrete construction started to take the place of wood. So there are no skills to pass on.' Did he see any future for his craft? 'Well, my son's learning the trade - he's my only apprentice. The market's got smaller.'

Shi Shun-Rong, a maker of papier-maché lion heads just round the corner, had followed a different path. 'My family were in the garment trade. I betrayed the family business.' All around, the fantasy of the toothed and bearded lions gaped, waiting to be picked up and danced with; the shop was a riot of clashing colours. 'The paper's made of horse shit,' he explained demurely before confirming what others said. 'The tradition [of making lions by hand] has disappeared from mainland China.'

And yet the Dragon Boat Festival and the races are enormously popular. In Lukang itself, though the races take place along an unprepossessing stretch of river by a noisy motorway, large crowds gathered to cheer and stuff themselves. Stalls selling a panoply of Taiwanese food at its weirdest and most intimidating had set up camp. Why do the racers take part in it? 'Money,' a member of a team from a girls' school told me, with the prospect of 50,000 Taiwanese dollars (£1,000) before her. Some intimidatingly fit students had a different view: 'Employers like to see it on a CV,' they said. A team from a civil service department were clutching a huge trophy, though on investigation they had only won sixth place. 'For the reputation of the department,' they told me soberly. Was there no pleasure in rowing? They looked at each other, and then at me, in puzzlement. Would they row, I asked the students, if the boats were simple rowing boats like the ones raced in at the Olympics. 'Oh, we're not up to that standard,' they told me, not understanding that I was asking about their sense of tradition. I felt very European.

The boats are spectacularly ornate, brilliantly coloured and fronted with the ferocious heads of dragons. Many of them now are manufactured by mechanical processes out of fibreglass, but plenty, wherever the dragon boat races are held, anywhere in the world, are the work of a Taiwanese boat-maker - the only one thought to be still at work at this craft. Liu Qin-Zheng's boatyard is in a tranquil part of Taipei, a dizzyingly smart and busy modern capital. Across the fields and beyond a humming slash of motorway, the enormous bamboo stalk of Taipei 101, the second-tallest building in the world, stood like a punctuation mark.

Down here, Liu Qin-Zheng practises his art with no hurry and clear enjoyment. Nine dogs were about him, sleeping, and burst into a furious chorus of barking as the unfamiliar visitor came in. Mr Liu was at work on a model boat, his tools laid out in exquisite order. He had the face of a satisfied man; a clever, high-cheekboned, agile face. He seemed alive with pleasure.

This fourth generation boat-builder's boats go all over the world. 'Before I die,' he said unaffectedly, 'I would like to travel the world to see all my children,' meaning his boats. His work provides the centrepiece of festivals not just in mainland China, but in countries such as Germany, South Africa and Finland. Was he proud of keeping a tradition alive? 'I just make a living. The government doesn't encourage traditions - they don't want to get involved.' Mr Liu understood well that, considering the delicate state of relations between Taiwan and the People's Republic, supporting a oneman craft could be seen as staking a claim.

There was something elegiac about Mr Liu's little corner of the world. His children were not interested: 'Not enough business.' His one apprentice was fifty, and also worked as a mechanic. His boats, which cost 700,000 Taiwanese dollars (£15,000), were made to last. He was a happy man: his trade would see him out. When he retires, it may be fibreglass models or museum pieces, unless the habit of making boats as a hobby strikes a Taiwanese as a worthy enterprise.

The Dragon Boat Festival is a custom seemingly kept going by willpower, surrounded by the remains of a great tradition of endeavour. Everyone I spoke to knew what they were doing was important; no-one had a great deal of faith that it would last beyond their lifetimes. It doesn't always feel like it, but Taiwan has had some luck in its turbulent history, both as a museum and as the fragments of a living tradition. When this dies out, it will still be a beautiful and fascinating place; but the little flame that lights and warms those precious remains of the past will have gone out.

Philip Hensher is the author of six novels and was shortlisted for the 2008 Man Booker Prize for The Northern Clemency (£12.99, Fourth Estate).

The article 'Here be dragons' was published in partnership with Lonely Planet Magazine.