An American mortician, John Miller, makes his way to Nanjing with the solemn task of burying the foreign head priest of a Catholic girls' convent, just following the city’s devastating bombing and invasion by Japanese forces. Shortly after his arrival at the convent, a flamboyant group of prostitutes, seeking refuge from the chaos of the war, discover the sanctuary that the convent provides, since foreign entities appear to be spared by the marauding Japanese soldiers.
As the prostitutes find a hiding spot in the cellar, Miller is confronted with a moral dilemma regarding the protection of the vulnerable teenage schoolgirls. Ultimately, he decides to assume the role of the convent's priest when Japanese soldiers come to the compound, searching for girls to exploit. With assistance from Mr. Meng, a local collaborator and father to one of the girls, Miller begins repairing the convent's truck, hoping to create a means of escape for the girls from the besieged city.
A Japanese Colonel, Hasegawa, finally assures Miller that the convent will be safeguarded by sentinels stationed at the entrance. However, this false sense of security is quickly shattered when Hasegawa demands that the girls perform a choral piece for him. Following their performance, he extends an official invitation for the girls to participate in the Japanese Army's victory celebration. Concerned for their safety, especially as the guards seem primarily concerned with confining the girls, Miller refuses the invitation, only to find that Hasegawa sees it not as a mere request but as a direct order, insisting that the girls will be taken the next day.
In a twist of fate, the Japanese soldiers inadvertently count one of the prostitutes, who has wandered out in search of her cat, bringing the total to thirteen. Inspired by their leader, Yu Mo, the prostitutes decide to intervene and shield the girls by confronting the Japanese on their behalf. Though initially opposed to their brave resolution, Miller ultimately aids them in disguising their appearances, employing his expertise as a mortician.
The following day, the thirteen are escorted by oblivious Japanese soldiers, while Miller cleverly hides the convent girls in the truck he has repaired. Utilizing a special permit acquired by Mr. Meng, he drives away from the town. In the poignant final scene, the truck can be seen traversing a deserted highway, moving towards safety, far from the advancing threat of the Japanese army.