Amidst Japan’s invasion of China during World War II, Jamie Graham, a British upper middle class schoolboy, enjoys a privileged life in the Shanghai International Settlement. After the attack on Pearl Harbor, the Japanese begin occupying the settlement. As the Graham family evacuate the city, Jamie becomes separated from his parents in the ensuing chaos. Jamie returns to their house hoping they will return. After a length of time alone and eating all the food, he ventures into the city.
Hungry, Jamie tries surrendering to Japanese soldiers who ignore him. After being chased by a street urchin, he is taken in by two American expatriates and hustlers, Basie and Frank. They nickname him, “Jim”. Unable to sell Jim for money, Basie and Frank intend to abandon him in the streets, but Jamie offers to lead them to his neighborhood to loot the empty houses there. Jamie sees his house lit and thinks his family has returned, only to discover the house occupied by Japanese troops. The trio are taken prisoner. They are then taken to Lunghua Civilian Assembly Center in Shanghai for processing. Basie is among those selected internees to go to the Suzhou Internment Camp, but Jamie is not. The soldiers tasked with moving the prisoners to the camp have a damaged map and do not know the route. Jamie knows the camp’s location and convinces the soldiers he can show them the way.
It is now 1945, nearing the end of the Pacific War. Despite the terror and poor living conditions of the camp, Jim survives by establishing a successful trading network—which even involves the camp’s commander, Sergeant Nagata. Dr Rawlins, the camp’s British doctor, becomes a father figure and teacher to Jim. One night after a bombing raid, Nagata orders the destruction of the prisoners’ infirmary as reprisal. He only stops when Jim (now fluent in Japanese) begs forgiveness. Through the barbed wire fencing, Jim befriends a Japanese teenager who is a trainee pilot. Jim also visits Basie in the American POW barracks, where Jim idolizes the Americans and their culture.
One morning at dawn, Jim witnesses a kamikaze ritual. Overcome with emotion, he salutes and sings the Welsh song “Suo Gân”. The base is suddenly attacked by a group of American P-51 Mustang fighter aircraft. Jim is overjoyed and climbs the ruins of a nearby pagoda to better watch the airstrike. Dr Rawlins chases Jim up the pagoda to save him, where the boy breaks down in tears—he cannot remember what his parents look like. As a result of the attack the Japanese decide to evacuate the camp. Basie escapes during the confusion, though he had promised to take Jim with him. As they leave, the trainee pilot Jim befriended attempts to take off in a Japanese attack plane, but is devastated when it doesn’t start. The camp’s prisoners march through the wilderness where many die of fatigue, starvation, and disease.
Arriving at a football stadium near Nantao, where many of the Shanghai inhabitants’ possessions have been stored by the Japanese, Jim recognizes his parents’ Packard. Jim spends the night there and witnesses flashes from the atomic bombing of Nagasaki hundreds of miles away.
Jim wanders back to Suzhou. Along the way he hears news of Japan’s surrender and the end of the war. He encounters the Japanese teenager he befriended earlier, who has since become a pilot but is now disillusioned. The youth remembers Jim and offers him a mango, and will cut it for him with his sword. Basie reappears with a group of armed Americans who have arrived to loot the Red Cross containers being airdropped over the area. One of the Americans, thinking Jim is in danger, shoots and kills the Japanese youth. Basie offers to help Jim find his parents, but Jim—infuriated over his friend’s death—chooses to stay behind.
Jim is eventually found by American soldiers and placed in an orphanage, where he is reunited with his mother and father.