In the midst of a wartime evacuation, a British aeroplane crashes on or near an isolated island in a remote region of the Pacific Ocean. The only survivors are boys in their middle childhood or preadolescence. Two boys—the fair-haired Ralph and an overweight, bespectacled boy nicknamed "Piggy"—find a conch, which Ralph uses as a horn to convene all the survivors to one area. Ralph is optimistic, believing that grown-ups will come to rescue them but Piggy realises the need to organise: ("put first things first and act proper"). Because Ralph appears responsible for bringing all the survivors together, he immediately commands some authority over the other boys and is quickly elected their "chief". He does not receive the votes of the members of a boys' choir, led by the red-headed Jack Merridew, although he allows the choir boys to form a separate clique of hunters. Ralph establishes three primary policies: to have fun, to survive, and to constantly maintain a smoke signal that could alert passing ships to their presence on the island and thus rescue them. The boys establish a form of democracy by declaring that whoever holds the conch shall also be able to speak at their formal gatherings and receive the attentive silence of the larger group.
Jack organises his choir into a hunting party responsible for discovering a food source. Ralph, Jack, and a quiet, dreamy boy named Simon soon form a loose triumvirate of leaders with Ralph as the ultimate authority. Upon inspection of the island, the three determine that it has fruit and wild pigs for food. The boys also use Piggy's glasses to create a fire. Although he is Ralph's only real confidant, Piggy is quickly made into an outcast by his fellow "biguns" (older boys) and becomes an unwilling source of laughs for the other children while being hated by Jack. Simon, in addition to supervising the project of constructing shelters, feels an instinctive need to protect the "littluns" (younger boys).
The semblance of order quickly deteriorates as the majority of the boys turn idle; they give little aid in building shelters, spend their time having fun and begin to develop paranoias about the island. The central paranoia refers to a supposed monster they call the "beast", which they all slowly begin to believe exists on the island. Ralph insists that no such beast exists, but Jack, who has started a power struggle with Ralph, gains a level of control over the group by boldly promising to kill the creature. At one point, Jack summons all of his hunters to hunt down a wild pig, drawing away those assigned to maintain the signal fire. A ship travels by the island, but without the boys' smoke signal to alert the ship's crew, the vessel continues without stopping. Ralph angrily confronts Jack about his failure to maintain the signal; in frustration Jack assaults Piggy, breaking his glasses. The boys subsequently enjoy their first feast. Angered by the failure of the boys to attract potential rescuers, Ralph considers relinquishing his position as leader, but is persuaded not to do so by Piggy, who both understands Ralph's importance and deeply fears what will become of him should Jack take total control.
One night, an aerial battle occurs near the island while the boys sleep, during which a fighter pilot ejects from his plane and dies in the descent. His body drifts down to the island in his parachute; both get tangled in a tree near the top of the mountain. Later on, while Jack continues to scheme against Ralph, the twins Sam and Eric, now assigned to the maintenance of the signal fire, see the corpse of the fighter pilot and his parachute in the dark. Mistaking the corpse for the beast, they run to the cluster of shelters that Ralph and Simon have erected to warn the others. This unexpected meeting again raises tensions between Jack and Ralph. Shortly thereafter, Jack decides to lead a party to the other side of the island, where a mountain of stones, later called Castle Rock, forms a place where he claims the beast resides. Only Ralph and a quiet suspicious boy, Roger, Jack's closest supporter, agree to go; Ralph turns back shortly before the other two boys but eventually all three see the parachutist, whose head rises via the wind. They then flee, now believing the beast is truly real. When they arrive at the shelters, Jack calls an assembly and tries to turn the others against Ralph, asking them to remove Ralph from his position. Receiving no support, Jack storms off alone to form his own tribe. Roger immediately sneaks off to join Jack, and slowly an increasing number of older boys abandon Ralph to join Jack's tribe. Jack's tribe continues to lure recruits from the main group by promising feasts of cooked pig. The members begin to paint their faces and enact bizarre rites, including sacrifices to the beast. One night, Ralph and Piggy decide to go to one of Jack's feasts.
Simon, who faints frequently and is probably an epileptic, has a secret hideaway where he goes to be alone. One day while he is there, Jack and his followers erect an offering to the beast nearby: a pig's head, mounted on a sharpened stick and soon swarming with scavenging flies. Simon conducts an imaginary dialogue with the head, which he dubs the "Lord of the Flies". The head mocks Simon's notion that the beast is a real entity, "something you could hunt and kill", and reveals the truth: they, the boys, are the beast; it is inside them all. The Lord of the Flies also warns Simon that he is in danger, because he represents the soul of man, and predicts that the others will kill him. Simon climbs the mountain alone and discovers that the "beast" is the dead parachutist. He rushes down to tell the other boys, who are engaged in a ritual dance. The frenzied boys mistake Simon for the beast, attack him, and beat him to death. Both Ralph and Piggy participate in the melee, and they become deeply disturbed by their actions after returning from Castle Rock.
Jack and his rebel band decide that the real symbol of power on the island is not the conch, but Piggy's glasses—the only means the boys have of starting a fire. They raid Ralph's camp, confiscate the glasses, and return to their abode on Castle Rock. Ralph, now deserted by most of his supporters, journeys to Castle Rock to confront Jack and secure the glasses. Taking the conch and accompanied only by Piggy, Sam, and Eric, Ralph finds the tribe and demands that they return the valuable object. Confirming their total rejection of Ralph's authority, the tribe capture and bind the twins under Jack's command. Ralph and Jack engage in a fight which neither wins before Piggy tries once more to address the tribe. Any sense of order or safety is permanently eroded when Roger, now sadistic, deliberately drops a boulder from his vantage point above, killing Piggy and shattering the conch. Ralph manages to escape, but Sam and Eric are tortured by Roger until they agree to join Jack's tribe.
Ralph secretly confronts Sam and Eric, who warn him that Jack and Roger hate him and that Roger has sharpened a stick at both ends, implying the tribe intends to hunt him like a pig and behead him. The following morning, Jack orders his tribe to begin a hunt for Ralph. Jack's savages set fire to the forest while Ralph desperately weighs his options for survival. Following a long chase, most of the island is consumed in flames. With the hunters closely behind him, Ralph trips and falls. He looks up at a uniformed adult—a British naval officer whose party has landed from a passing cruiser to investigate the fire. Ralph bursts into tears over the death of Piggy and the "end of innocence". Jack and the other children, filthy and unkempt, also revert to their true ages and erupt into sobs. The officer expresses his disappointment at seeing British boys exhibiting such feral, warlike behaviour before turning to stare awkwardly at his own warship.