the only one captured by the United States. The Royal Navy pulled off the same trick, and did it first.
http://uboat.net/fates/captured.htmby Gudmundur Helgason
U-110 - "The Secret Capture"
May 9, 1941. This is what most people view as the most important capture of the entire war and it was so secret that even the crew of U-110 did not know of it! U-110 (on its second patrol under the command of Kptlt Fritz Julius Lemp) had been attacking a convoy along with U-201 (Oblt Adalbert Schnee) when Lemp left his periscope up too long (probably to confirm a kill, he sank two ships on that day amounting to 7500 GRT) and the escort HMS Aubretia noticed it and rushed to the scene dropping depth charges.
U-110 survived the first attacks but then HMS Bulldog and HMS Broadway came and join in the hunt. U-110 was forced to surface and HMS Bulldog immediately went onto ramming course (its commander realized at the very last moment that a capture might come off and tried to evade hitting U-110 which he almost did) which Lemp noticed and ordered "Abandon Ship". Lemp figured that since the boat was going to be rammed (and presumably sunk) its secrets were safe within it. Only when he was in the water did he realize that the boat was not sinking and attempted to swim back and prevent capture and that was the last seen of him. Many say he was shot in the water by a British sailor but that may not be at all true.
The British made several journeys between U-110 and HMS Bulldog to collect whatever they could get their hands on inside the boat. This must have been a real treat as U-110 was abandoned in a hurry and being a IXB class she did not sink as rapidly as VIIC would likely have done. It is very likely that numerous U-boats were sunk using the material found inside U-110.
The day after the boat was captured someone realized that the allies already had the most important part of U-110, namely the secret documents and Enigma machine and that the Germans might find out that the British had the boat soon and, assuming the worst, change all codes and cipher system. The boat "accidentally" sank when being towed to Britain. 15 men were killed in the action and 32 captured. Lemp himself did not survive as noted above.
----
This is the story that they based the Hollywood movie on.