Despairing over the loss of a 19-year-old Marine fighting in 1951 Korea, gunnery sergeant McGrath (Robert Webber) decides his next dangerous mission will be accomplished with a more expendable crew. He approaches the commander of the brig, explaining that he wants a dozen of his worst prisoners for latrine duty. This "dirty dozen" group of criminals that the brig commander selects are a motley assortment of men, ranging from the cowardly clerk Oliver Quill (Kenny Miller) to the hardened and dangerous Dockman (Leo Gordon). Not until McGrath orders a helicopter to fly him, his Korean guide Pak (Dale Ishimoto), and the dozen prisoners to their destination, does anyone get suspicious and follow up with the base commander. The actual mission was to target a critical North Korean mountain tunnel, but the men who were originally assigned to go with McGrath were still waiting at the base. The base commander is furious at McGrath, but he calls for the air support that he knows McGrath and his men will need.
Almost immediately upon being dropped behind enemy lines, McGrath and his men encounter a group of North Korean soldiers approaching in a vehicle. Two of the men decide they want nothing to do with engaging those soldiers, or carrying out the mission McGrath tricked them into going on, so they run. A third prisoner yells at them to stop, which alerts the North Koreans, who open up and shoot and kill the two runners. McGrath and the others then attack the North Koreans, killing them and destroying their vehicle.
The fighter-bombers that were flying in support of McGrath and his men arrive and begin dropping bombs in the area, targeting anything that appears to be potential threats. Unfortunately, that includes a school bus carrying a nun and a group of North Korean schoolgirls. A bomb lands in the road just ahead of the bus, forcing the driver to lose control and crash. One of the school girls is killed. The other girls begin running, trying to escape further bombs, and they run right into the arms of the Americans.
Fearful that the Catholic nun Mary Joseph (Anna Sten) and the girls may reveal their position to the enemy, McGrath orders the women to accompany them. The sister is adamantly against that, but it's made clear to her that she has no choice if she and the girls want to live.
The sister and the school girls are all very attractive, which makes it even more difficult for the men to focus on their conflicting objectives, which, depending on the particular men, are to either carry out the mission or try to escape. The women at one point strip down to their undergarments to take a refreshing swim. On another occasion, they are required to cross a deep river gorge on a rope bridge, requiring each of them to be escorted by the men, who embrace them from behind and walk them across. Some of the women don't hide their attraction to certain of the men, and vice versa.
As for the prisoners, Dockman (Leo Gordon) is the main instigator for attempting to escape. He sets about approaching each of the others one at a time and recruiting them to the effort. His plan is to at some point cause McGrath to become a "casualty of war." He successfully convinces all but a few of them to go along. One of the men he has trouble convincing is Orville Nupert (Robert Easton), a tall southern boy who is extremely naive and is a member of a religious cult that worships snakes. He carries a snake, "Pawnee," with him everywhere he goes, which frightens and disgusts Dockman. When Pawnee slips away from Johnson as the group is walking along a trail, Dockman smashes Pawnee with his rifle butt and then flips it off into the trees. That upsets Johnson a great deal and he can't understand why Dockman would do that.
When one of the girls drifts away from the main group, McGrath and the sister backtrack to look for her. They find her just about the time she stumbles and falls into a fast-moving stream. Both McGrath and the sister end up in the stream as they attempt to rescue the girl. McGrath is able to get both women to the bank.
While McGrath and the sister are gone looking for the lost girl, Dockman and his collaborators decide to attempt their escape. They disable and tie up Pak, but then, one by one, the other men decide that running away would be dishonorable, plus they've come to respect McGrath, so they choose to stay. Dockman is forced to give up his plan.
Meanwhile, some of the girls discover some alcoholic beverages in the ruins of a nearby building and they decide to have a party. The men soon join in, and things threaten to get out of hand, as the participants begin to lose their inhibitions. No one is particularly concerned with how things are going until Dockman begins trying to force himself on one of the girls and she resists. Some of the other men rush in and pull Dockman off the girl.
Rivas (Valentin De Vargas), who very much dislikes Dockman, hands the girl a belt and while two other men hold Dockman, she begins whipping Dockman. About that time, McGrath, the sister, and the lost girl all return. During the distraction of their arrival, Dockman escapes from the men holding him and he grabs the girl who was whipping him and puts his arm around her neck. He threatens to break her neck, just as Sister Mary Joseph picks up a rifle and points it at him, intending to shoot, but then she suddenly collapses. The other men then regain control over Dockman and tie him up.
The sister was weakened by a leg wound suffered in the bombing of the road earlier. The wound has become infected and she is experiencing blood poisoning. She is also feeling guilty about picking up that rifle and fully intending to shoot Dockman with it. McGrath is asked by one of the girls to speak with the sister about that. McGrath decides to tell the sister that they both abide by the books of their trade. His is the marine corps manual, hers is the Bible. He explains that sometimes it takes a certain event or experience, causing them to question the authority of the book, to convince them just how important the book really is.
The group continues on the march to the mission objective, arriving mid-day to see North Korean military vehicles exiting from the tunnel and passing through a security check-point. McGrath decides that they will wait until dark to attack. He learns from the Navy corpsman who was among the prisoners, that Sister Mary Joseph won't survive that long. The girls want McGrath to allow them to take the sister down to the North Korean camp, where a doctor would be stationed. He refuses, because it would compromise the mission.
The sister attempts to calm any misgivings that McGrath may have about sacrificing her by telling him that "death is my wedding day." She does say she will try to hang on until that night, when McGrath promises to get her to a doctor after the tunnel is blown.
The sister of the girl who died in the earlier bombing was among the surviving school girls and she has vowed vengeance against McGrath. This latest issue with McGrath's refusing to get Sister Mary Joseph to a doctor is the last straw for her, and she starts down the hill, calling out to the North Koreans. Dockman, who'd been released from his bonds and given a gun so he could assist in the attack that night, chases after the girl. It appears they are both shot by the North Koreans and they fall and roll down the hill.
McGrath is forced to immediately improvise and adjust his plans. He allows the girls to fashion a makeshift stretcher and start carrying Sister Mary Joseph towards the North Korean Camp and a doctor. Meanwhile, he orders his men to take up arms and charge down the hill towards the tunnel and the security check point. Even Quill, the consummate coward, manages to force himself to join in. It's pretty much a suicide mission and several of the men are cut down almost immediately by machine gun fire, but as we observe the girls struggling to carry Sister Mary Joseph away, there's a massive explosion, indicating that the tunnel had been destroyed.