The fire caused an automatic shutdown of the nuclear reactor on board the K-414 Daniil Moskovsky, a Victor III class nuclear-powered submarine, and was quickly extinguished.
"Most probably it was a short circuit [in the electrical compartment]," Russian Navy Commander Vladimir Masorin said.
Masorin said two sailors involved in extinguishing the fire died because they did not put on gas masks immediately. The other sailor was affected by carbon monoxide after his gas mask ran out of oxygen, but his life is out of danger already.
The crewmen were still alive when they were recovered from the compartment, but died before a helicopter arrived to take them to hospital, the commander said.
Masorin said the submarine, commissioned in 1991, missed its repair deadline, but its service life was extended as it was in good condition.
The Daniil Moskovsky participated in a search-and-rescue effort during the Kursk nuclear submarine tragedy in August 2000, when all 118 crewmen died.
The Northern Fleet earlier reported that the submarine was towed to Vidyayevo, a naval base 130 km (about 81 miles) from the Russian Northern port of Murmansk on the Barents Sea.
"The operation to tow the surfaced submarine has been completed," the fleet said.
Military prosecutors launched a criminal investigation into the incident, looking into possible violations of navigation rules. Investigators are working at the Vidyayevo base.