In the midst of World War II, the battle below the seas rages. The Nazis have the upper edge as the Allies are unable to crack their war codes. That is, until a wrecked U-boat sends out an SOS signal, and the Allies realize this is their chance to seize the 'enigma coding machine'. But masquerading as Nazis and taking over the U-boat is the smallest of their problems. The action really begins when they get stranded on the U-boat.
During World War II, the Allies were having trouble against the German Navy especially their U-Boats because of their highly sophisticated cipher machines. When a German U-Boat is damaged and is waiting for assistance, the Americans decide that this is an opportunity for them to get the machine. So they have one of their subs made up to look like a German, and plan to pretend to be the ship sent to assist them and take control of the U-Boat and take the machine and destroy the sub so that the Germans will not know that they have the machine. And everything went according to plan; they got the machine and transferred the crew to their sub and were about to leave when out of nowhere they're hit by a torpedo from the German relief sub. The members of the crew who were not on board the sub, proceed to board the German U-Boat and try to make it back. Now the senior officer is the sub's XO who's eager to be in command but his commander had told him earlier that he felt he was not ready because he might not be ready to make tough decisions. And now he has to, if he and the survivors are to survive.
In the battle front of espionage and code cracking of World War II, there remains but one task on the Allied agenda: the capture of a German "Enigma" machine which will allow the Allied naval forces to locate and track submerged German U-Boat submarines. When one such German vessel breaks down after a battle with British forces, a secret mission is dispatched to take over the U-Boat by commando American forces and retrieve an Enigma machine intact. The raid goes well, at first, yet following the destruction of the American mothership and the arrival of reenforcement German ships, the Americans trapped on the U-Boat must use their training and wits to pilot U-571 in order to save their lives.
A German submarine is boarded by disguised American submariners trying to capture their Enigma cipher machine.
- German U-boat U-571 is immobilized by a British destroyer. The US Navy submarine S-33 has been modified to resemble a German U-boat to steal the Enigma coding device and sink the U-571.
During a storm, the S-33 comes across U-571 and sends a boarding party over. After securing the ship and transporting the captured crew back to the American S-33 sub, the S-33 gets sunk by the arrival of a German resupply sub. The captain of the S-33, Lieutenant Commander Dahlgren, dying in the water, orders his men on the captured U-boat to submerge. Lieutenant Tyler takes command of the enemy U-boat and dives to engage the resupply sub in an underwater battle before destroying it.
After making repairs and restoring power Tyler decides to route the disabled submarine to Land's End in Cornwall, England. They are spotted by a German plane which is unaware that the U-571 has been commandeered by Americans; a nearby German destroyer sends over a small contingent but right before boarders arrive, Tyler gives orders to fire a shot from the deck gun, destroying the German ship's radio room, and preventing it from reporting that the capture of a German sub and its Enigma machine and code books. The sub dives underneath the German ship, which then begins to drop depth charges to sink U-571.
Tyler attempts to trick the destroyer into stopping its attack by ejecting debris and a corpse out of a torpedo tube, faking their own destruction. The German destroyer continues dropping depth charges. U-571, hiding at below 600 feet (180 m), is damaged by the high water pressure. Control of the main ballast tanks is lost and the ship ascends uncontrollably. Tyler orders crewman Trigger to submerse himself in the bilge underwater to repressurize the torpedo tubes.
Trigger uses an air hose to enter the flooded compartment. He closes the air valve to the torpedo tubes, but a second leak and broken valve are found, which Trigger can't reach. U-571 surfaces, unable to fire its last torpedo. The destroyer fires on the ship, which is heavily damaged and begins to flood. The first hit causes pipes to collapse, pinning Trigger's leg, after he has left the air hose behind. Unable to turn back, he reaches for the valve and closes it before he dies. The second the pressure is available, Tyler orders Tank to fire the final torpedo. The German destroyer is destroyed. As the crew sigh in relief, Tank reports Trigger's death. U-571 has taken severe damage and will not remain afloat for long. The crew abandons ship with the Enigma in their possession. The crew watch U571 as she slips beneath the waves. Floating aboard an inflatable lifeboat, they are eventually rescued by a US Navy PBY Catalina flying boat.