Peter Zschech " Kapitanleutnant " Peter Zschech ( died October 24 , 1943 ) was the second commander of the German submarine " U - 505 " . He earned notoriety as the first ( and thus far only ) commanding officer to while in active command of a naval vessel , as well as the only submariner to ever do so while underwater . History with U - 505 . " U - 505 " ' s first and very successful commander was Kapitanleutnant Axel Löwe , who was relieved for illness in October 1942 . Löwe was replaced by Zschech , a veteran U - boat officer , who served for a year as watch officer in " U - 124 " . Zschech was described as a " hard " commander , ambitious in his first command , indifferent to the morale of his men , and bad - tempered . On November 11 , 1942 , a month into her first war patrol under Zschech , " U - 505 " was heavily damaged by air attack in the Caribbean Sea . The direct impact of a 250 - lb bomb from a Lockheed Hudson on the foredeck tore the deck gun from the boat and severely breached the hull . Zschech ordered his men to abandon ship but his officers refused and managed to keep her afloat after a marathon 2 week effort . She eventually limped back to Lorient on December 12 , earning the vessel the mixed honor of being the most heavily damaged U - boat to successfully return to port during the war . Repairs took six months . When Zschech again attempted to take U - 505 to sea , repeated mechanical failures forced him to turn back for repairs after only a few days . This happened six consecutive times , usually due to sabotage by French dockyard workers in the Resistance , and caused U - 505 to become the butt of numerous jokes for her combat ineffectiveness ; while some U - boats were racking up impressive tonnage totals ( and others were being sunk with all hands ) , U - 505 had not even succeeded in leaving the Bay of Biscay in almost a year . The main joke about Zschech was , while many other u - boats were being sunk with all hands . . . " there is a captain who will always return home . . . Zschech " ( due the sabotages before mentioned , such as defective welds ) . Suicide while in command . On October 10 , 1943 " U - 505 " finally managed to sortie successfully on patrol after six failed attempts . After only 14 days , she drew the attention of a pair of Allied destroyers while surfaced off the Azores and came under concentrated depth charge attack , a procedure all too common for U - boat crews by this point in the war . While riding out the depth charging , Zschech apparently suffered a severe mental breakdown and committed suicide by shooting himself in the head with a Walther PPK pistol in his control room , in full view of his shocked crew . His second - in - command , Oberleutnant Paul Meyer , swiftly took command , rode out the remainder of the attack per standard procedure and returned the boat to port with light damage . Amazingly , he was not commended for his quick restoration of military discipline , but only " absolved of all blame " by the Kriegsmarine , who seemed to view U - 505 ' s troubles as proof of a generalized lack of discipline by her command crew , further harming whatever morale remained in the command staff of U - 505 . Zschech ’ s suicide devastated the morale of " U - 505 " ’ s crew . However , Grossadmiral Karl Doenitz did not dissolve and disperse the crew as many officers recommended ( and most on U - 505 had requested ) , fearing the effect on fleet morale if the story spread to other U - boats . It is generally accepted by historians that the terrible morale instilled in U - 505 ' s crew by the combined influence of these events led heavily to her being the only U - boat to be captured intact on the surface ( instead of being scuttled as was standard procedure ) when " U - 505 " was attacked southwest of the Canary Islands on her next patrol ; the crew reportedly panicked almost at once , with the new captain surfacing and abandoning ship before she was unseaworthy or even significantly damaged , leading to " U - 505 " s capture by the Allies , along with an intact Enigma machine , the month ' s Kriegsmarine codebook , and a variety of other secret documents . Perhaps most damaging of all , the Allies recovered U - 505 ' s G7es acoustic homing torpedo es , which were extensively reverse engineered to improve the Allied Foxer decoy system . Although dreadfully embarrassing to the Germans , U - 505 ' s unusually intact state led to the ship being preserved as a museum ship after she was stripped of intelligence value . She currently resides as an indoor exhibit at the Museum of Science and Industry in Chicago , Illinois .