The submarine Dolphin reported the fire and flooding at 11:30 p.m. Tuesday as it was operating on the surface about 100 miles off the coast of San Diego.
The crew was evacuated by small boat to the McGaw, another Navy vessel in the vicinity at the time, and was on its way to San Diego on Wednesday morning.
Two crew members who fell in the water during the rescue were recovered by a Coast Guard helicopter.
Navy spokeswoman Lt. Kim Marks said there were a few minor injuries but could not elaborate what they were.
The fire and flooding were controlled and the submarine was stabilized early Wednesday, military officials said. The vessel remained at the accident site being assisted by two other vessels and was expected to be transported back to San Diego later Wednesday.
The cause of the accident is under investigation.
The submarine had been on a training mission since Monday, said Cmdr. David Koontz.
The USS Dolphin, stationed in San Diego, is the Navy's lone diesel-electric research submarine. Commissioned in 1968, the 165-foot-long vessel established a world depth record for operating submarines, with a recorded test depth of more than 3,000 feet.
The Dolphin can carry scientific payloads of over 12 tons, a considerably greater capacity than any other deep diving research vessel operating today, the Navy says.
It is used by both Navy and civilian researchers and is laden with high-tech equipment.
Of the 43 aboard, 41 were crew and two were civilians, the Navy said Wednesday.