In a cheap hotel on the Khao San Road in Bangkok, Richard, a young English backpacker, meets a mentally disturbed Scotsman going by the alias of Daffy Duck who gives him a hand-drawn map, with directions to a beautiful island with a hidden lagoon and beach, located in the Gulf of Thailand and inaccessible to tourists. Shortly after receiving the map, Richard discovers that Daffy has committed suicide. Wanting company in his search, Richard befriends a travelling French couple,Étienne and Françoise, and the trio sets out to find what they hope might be an untouched paradise.
On their way to the island, Richard gives a copy of the map to Sammy and Zeph, two American Harvard students he meets on Koh Samui. When the three finally reach the hidden beach— after bribing a local boat pilot, swimming from an adjacent island, discovering a cannabis plantation in the jungle and avoiding the armed owners, and eventually jumping over a waterfall — they discover a group of around 30 backpackers that have largely shut off the outside world to live a slow-paced life of leisure, under the de facto leadership of an American woman called Sal and her South African lover Bugs, who, along with Daffy, founded the community there in 1989. They live in a village of hand-built wooden huts and tents, located near a large and beautiful beach and lagoon that is encircled by cliffs and connected to the sea by underwater caves.
When Richard,Étienne, and Françoise arrive, it is already 1995, six years after the founders came to the beach. Only a small number of friends and acquaintances have been chosen by the founders to come to the island, and thus newcomers are not welcome, but are not sent away because to do so would jeopardize the secrecy of the community — the residents fear that if word gets out the beach will become overrun with tourists and ruined, like many of Thailand's other beauty spots. They are also mindful of upsetting the Thai cannabis farmers, with whom they originally agreed to keep to separate territories but who have more recently warned them not to bring anyone new to the island, as the farmers fear discovery by the police. After initial suspicion, the group accepts the trio when they explain about Daffy's map and his death back on the Thai mainland.
Since the community aims to be self-sufficient, work is divided into rosters, for the garden, fishing, cooking, and carpentry. Along with Françoise and Étienne, Richard becomes a part of the fishing detail. For several months, Richard finds life on the island idyllic, fishing in the mornings and relaxing the rest of the time. He finds friends in a few other members of the community: Keaty, a fellow Englishman hooked on his Game Boy; Gregorio, a Spaniard on his fishing detail; Unhygienix, the Italian head chef obsessed with soap since he handles fish every day; Jesse and Cassie, two lovers; Ella, who works second-in-command to Unhygienix; and finally, Jed — the loner of the group whose mysterious job involves going alone into thejungle. Richard later discovers that Jed has been assigned by Sal to be the island's guardian: he watches the sea and shores of the neighboring islands for any signs of people attempting to discover the beach. Jed also has a sideline of stealing some cannabis from the Thai farmers' side of the island.
One day, Unhygienix informs everyone that their rice supply has been infected by a fungus and Sal announces an emergency Rice Run— an occasional discreet trip to the mainland by boat to bulk-buy rice and other essentials. Due to the laborious nature of the task, no one volunteers for it except Jed, who, to the bewilderment of most others, always takes the job. Richard also volunteers, and so the two travel back to Koh Phangan for their supplies. It is during the Rice Run that Jed finds out that Richard gave a copy of the map to Sammy and Zeph when Jed coincidentally wanders past and overhears the two Americans relaying the urban legend of the beach to some Germans. The Rice Run goes without a hitch but soon, accompanied by three Germans they met on the mainland, Zeph and Sammy make their way to the nearest neighbouring island, which worries Richard because he will be blamed if they successfully reach the community. Soon after, Sal reassigns Richard to the perimeter detail to partner with Jed and keep a close eyeon the potential invaders.
With a free spot in Gregorio's fishing detail, Keaty moves in to take Richard's place. A few days later, Keaty mistakenly catches a dead squid that gives severe food poisoning to most of the group, with the few remaining healthy members struggling to nurse the sick residents back to health. Richard returns from his sentry duty to find that Bugs has punched Keaty in the face for his mistake. Richard, having never liked Bugs due to his arrogant nature, instigates a heated argument with him in front of the whole group, which leads to a division of the community into several cliques. On this day, only two of the fishing details are still in operation and the best detail, consisting of three Swedes— Christo, Sten and Karl — who fish outside the safe lagoon area, are attacked by a shark. The camp only finds out about this with the return of one of the three, Karl, in the early evening. Karl carries Sten on his back to the village, where Sten is discovered to have already bled to death. Karl was not physically hurt by the shark, but he suffers severe emotional trauma from having watched his friend die. He subsequently spends his time sitting in a dug-out hole on the beach and not talking to anyone; barely accepting food and water. Richard realizes that Christo is still missing and, athis own risk, retrieves him from partially submerged caves of the lagoon. Richard is praised for his heroic rescue of Christo. However, as Christo is gravely wounded, he requires Jed's presence in the camp, because only Jed has the medical knowledge to tend to him. This leaves Richard to work the sentry detail alone.
A few days later, a funeral is held for Sten near the jungle waterfall, and Sal gives a decisive speech which goes some way to restoring social harmony. She announces that it is the 11th of September, and that they will thus be celebrating the Tet festival in three days' time. Spending long hours alone in the forest as he hikes between lookout spots, Richard begins to experience hallucinations in which Daffy appears: they converse and patrol the part of the island which Richard refers to as the DMZ together. Richard comes to appreciate that Daffy killed himself because he could neither endure the unravelling of his elitist vision of the beach as the group grew in size, nor bear the thought of a return to backpacking or settled life, and notes that he himself is falling prey to that way of thinking. Richard also realizes that Daffy gave him the map— as well as spreading rumors of the island all over Thailand — so many travelers would come looking for the beach, inevitably leading to it becoming a tourist destination. Daffy describes this act as "euthanizing" the community, and Richard realizes he was merely a pawn in Daffy's revenge plan.This comes to a head following the arrival of the American/German group by raft. Unlike Richard, Étienne, and Françoise who managed to overcome all obstacles in getting to the beach, the newcomers never make it past the most dangerous hurdle: the cannabis farmers. Richard witnesses them being first beaten violently and then dragged away. The sound of gunshots implies the farmers have murdered the intruders.
Richard returns to the community campsite to immediately inform Sal and Jed of what happened. He then goes to the beach to visit Karl, who attacks Richard and runs off into the jungle. On the day of the Tet festival, Sal obtusely asks Richard to kill Karl because of the threat he poses to the group's now-fragile social integrity, complaining that she constantly has to lift morale in the wake of the poisoning incident and Sten's death. Richard, disillusioned with the beach, resolves to escape with his closest friends. That night, he swims out to the cave where the group's only boat is kept, only to find that Karl has used it to escape to the mainland.Étienne corners him thereafter and soon discovers that he, along with the rest of his clique, has become frightened of Richard "doing things" for Sal. Richard convinces Étienne, Françoise, Jed and a paranoid Keaty to leave the beach for good, and euthanizes the dying Christo. Now fully aware of what Sal is willing to do to protect the beach, they decide to spike the food for the party and escape on the raft that the doomed backpackers used.
Night falls, and the party begins. Prior to dinner, Keaty and Richard spike the stew Unhygienix cooked with fermented coconut milk ans a huge amount of cannabis to immobilize the group. Richard and his friends are about to slip away when the Thai farmers arrive. The farmers threaten all of them with guns as they believe that the beach dwellers invited the recent arrivals. The farmers beat up Richard, while leaving the bloodied corpses of the American/German backpackers as a warning. At the sight of this, the extremely intoxicated group experience a collective mental breakdown and start to rip the corpses apart in a frenzy. Sal discovers that Richard has spread the secret of the beach when she picks up the map he drew for Zeph and Sammy. Upon hearing this, the now unstable community members attack Richard with sharp objects. Richard believes he is about to die, but he is saved when Françoise, Étienne, Keaty and Jed return from the beach armed with their fishing spears to drive the others off, while seriously wounding Sal and Bugs in the process. Richard and his rescuers make their planned escape on the raft.
In the epilogue, it is revealed that the five friends got away and split up when they reached the mainland. It has been a year and one month since his departure from Thailand, and Richard has returned home to Britain and hasn't heard from Françoise and Étienne again, but states he is likely to bump into them eventually because "the world is a small place, and Europe is even smaller". He still keeps in contact with Keaty and Jed. By chance, Keaty and Jed end up working new jobs in the same building, although for different companies; similar to how they both happened to stay in the same guesthouse years before they first met at the beach. He also hears in a news report that Cassie has been arrested in Malaysia for smuggling a large amount of heroin and will be the first Westerner to be executed in the country in six years. Richardwonders whether other people got off the island, particularly Unhygienix, whom he liked. He believes that Bugs died and hopes that Sal died too, because he does not like the idea of her "turning up on his doorstep".
Richard finishes by saying he is content with his life, though he carries a lot of scars: "I like the way that sounds. I carry a lot of scars".