A young and naive Englishman, John Truscott, Hugh Dancy, travels to the British protectorate of Sarawak in Borneo—a region the film describes as a colony—to apply his father’s humanitarian work to the Iban people. There he meets his boss Henry Bullard, Bob Hoskins, and his wife Aggie Bullard, Brenda Blethyn. John aims to civilize the land by building schools and introducing education, while slowly learning the unfamiliar local customs that shape daily life for the Iban communities. A girl named Selima, Jessica Alba, becomes his sleeping dictionary, sleeping with him and teaching him the language and habits of the locals.
John is sent upriver to reach the Yakata tribe, where a sickness spreads among the people. He and Selima travel inland together, and John witnesses a mining operation run by European miners. He discovers that the Yakata have been given rice by the miners, and he suspects the miners have poisoned it to drive the Yakata away. Realizing the miners may seek revenge, John warns the Yakata, who respond by wiping out the European workers. Despite the miners’ downfall, John and Selima find themselves drawn toward a forbidden romance, even as the longhouse forbids such a union. When John shares his plans to marry Selima with Henry, Selima is locked up. Ultimately, Selima agrees to marry within the longhouse long enough to part ways, while Bullard pressures John to abandon her.
Bullard imposes a hard choice: John must give up Selima and travel to Britain for a year, where he will meet Bullard’s daughter Cecilia, Emily Mortimer. Another British official, Neville Shipperly, Noah Taylor, a boorish drunk who bears contempt for the locals, watches with jealousy as John’s path diverges from his own plans. A year passes, and John is seen marrying Cecilia, though his heart remains unsettled by Selima. Back in Sarawak, Cecilia senses the pull toward Selima, and John admits that Selima is married to Belansai and has a child.
While at a lake collecting rocks for research, John spots Selima with her baby and believes the child might be his. He asks Famous to arrange a meeting with the pair. At the house, Selima returns, unaware that John is there, and John finally meets his son Mandar. Belansai, upon hearing that John is spending time with his wife, sneaks in to confront him and blades him with a razor; he escapes punishment only to be torn from the scene as Henry reveals his own past with a “sleeping dictionary” that produced Selima. Belansai is captured and sentenced to be hanged for attempting to kill an officer, a decision John accepts despite Selima’s empathy for him as a friend and father figure to Mandar.
That night, Selima helps Belansai escape, breaking him out and handing him a gun. As Belansai makes haste toward freedom, John asks Selima to meet him at the dock so they can run away together. Selima fears they will be caught, to which John replies, “Then I’ll tell them I’d rather have you than a country... or a language... or a history.” The moment deepens the rift and the rain pours as they embrace, savoring a future beyond borders.
The next day, the longhouse turns against Selima, and she becomes Neville’s sleeping dictionary once again. Cecilia reveals she is pregnant, adding another layer of tension to John’s loyalties. That night, Selima strikes Neville down, knocking him unconscious when he tries to attack her, and she seizes the baby to flee toward the docks. John, torn between love and duty, weighs his happiness against his obligations, while Cecilia accepts that John’s heart lies with Selima and her child. Aggie, ever wary of losing Henry, urges Neville to pursue them.
With help from Famous and the Yakata, John searches for Selima, who believes John has abandoned her. They are finally reunited just as Neville confronts them with a gun. He orders them to cuff themselves to the bamboo, intending to kill John, Selima, and their baby. In a dramatic rescue, the Yakata intervene and kill Neville, lifting the threat from their path. The story closes with John and Selima choosing to live together, migrating to a new life among the Yakata, away from the pressures of empire and language, and toward a shared future.