During World War II, the Germans transform Colditz Castle into a high-security prisoner-of-war camp named Oflag IV-C, designed to restrain Allied prisoners who have already attempted escapes from other camps. It houses first Polish, then British, Dutch and French inmates. Among the British are Pat Reid and Senior British Officer Colonel Richmond. Richmond is warned by the Kommandant that > escaping is verboten <, but he has no intention of heeding this advice. All the prisoners are wary of Priem, the chief security officer, who is efficient and tenacious.
Reid and other British officers attempt to open a manhole cover one night, but a simultaneous French attempt and the ensuing confusion alert the German guards. Reid and La Tour, a French officer, argue about the lack of cooperation, both blaming the other. Later, a British tunnel is making progress until it meets another being dug by the Dutch officers, and a collapse occurs. Richmond proposes the selection of an escape officer from each nationality to make sure attempts do not interfere with each other. This would be on the understanding that the escape officers cannot themselves take part in an escape. Reid accepts the post for the British contingent.
Richmond concocts an escape plan, which hinges on his impersonation of a feldwebel nicknamed Franz Josef for his resemblance to the former Austrian emperor. This seems to be succeeding until, at the key moment, the German guards emerge and arrest all concerned. Harry Tyler, disguised as a German goon, is shot and wounded trying to escape. Richmond, Reid and a dozen others are placed in solitary for a month and the likelihood of an informer is discussed.
Soon after being released, Jimmy Winslow is hidden among pallets being taken out of the castle and is not immediately caught. A Polish officer, whose family have been threatened by the Gestapo, is soon found to be collaborating with the guards. While his own people condemn him to death, the Kommandant – at Richmond's urging – transfers him away.
After two weeks on the run, Winslow is recaptured and returned to Colditz. While he is in the solitary compound, he talks to La Tour, who's in for goon-bating, during a physical exercise session and watches as La Tour, helped by a compatriot, leaps over the barbed wire fence. Winslow runs into a guard to throw off his aim, and La Tour runs to freedom. Soon afterwards, Richmond expresses annoyance that no British officer has yet made a complete escape.
Reid's friend Mac McGill approaches Richmond with a new plan but says he will only disclose it if Richmond will relieve Reid from his escape officer duties so that he and Reid can make the attempt together. Richmond agrees, and McGill convinces Reid that the plan is feasible. The escapees will be disguised as German officers, but will approach the guards from the direction of the German mess. The attempt will coincide with a revue being staged in the castle theatre, to which all senior German officers will be invited.
McGill is very tall and has antagonised the guards many times by reckless behaviour. Richmond realises that he will be too conspicuous and asks him to stand down so that the others selected will have a good chance of making the plan work. Next day, he scales the wire fence surrounding the exercise compound in broad daylight and is shot dead by the guards. Reid, on learning of Richmond's decision, refuses to join the escape attempt but Richmond persuades him to do so, arguing that Mac Gill's life will have been wasted otherwise. The escape goes ahead as planned during the revue. Reid, Winslow, Tyler and Dutchman Lutyens get out of the castle, but Tyler and Lutyens are soon recaptured.
Several days later, Richmond receives a postcard with a cryptic message. He announces to the assembled and cheering prisoners that Reid and Winslow have successfully crossed into neutral Switzerland.