Jeff Chandler was originally offered the role that went to Cary Grant, but chose to work on The Jayhawkers! (1959) instead. Grant himself was at first reluctant to take it, knowing he was much too old to play a wartime captain.
In the film the submarine is on a constant quest to reach a submarine repair ship to restore her operational status again. In real life Tony Curtis served on the submarine repair ship USS Proteus during WW2. It was alleged his enlistment in the Pacific Submarine Force was inspired by the film Destination Tokyo (1943), starring Cary Grant.
The "sinking" of a truck was inspired by a real incident that happened in 1944. On August 9, USS Bowfin (SS-287) followed four Japanese ships into Minami Daito Harbor. She fired her six bow torpedoes at the moored ships, hitting three and sinking two of them, but one torpedo went astray and hit a pier. A bus parked on it was blown up and thrown into the water by the explosion.
Some of the plot points of the movie were based on real-life incidents. Most notable were scenes set at the opening of WW II, based on the actual sinking of the submarine USS Sealion (SS-195), sunk at the pier at Cavite Navy Yard, the Philippines; Cmdr. Sherman's letter to the supply department on the inexplicable lack of toilet paper, based on an actual letter to the supply department of Mare Island Naval Shipyard by Lt. Cmdr. James Wiggin Coe of the submarine Skipjack (SS-184); and the need to paint a submarine pink, due to the lack of enough red lead or white lead undercoat paint.
Lt. Barbara Duran (Dina Merrill), the love interest of Tony Curtis' character, is portrayed in the 1977 television series remake Operation Petticoat (1977) by Curtis' daughter, Jamie Lee Curtis.