General Ali Fadavi, deputy head of the Navy of the Revolutionary Guards, said the missile has a speed of 360 kph underwater - the fastest in the world.
The Iranian missile has the same speed as the Russian-made VA-111 Shkval, developed in 1995 and believed to be the world's fastest - three or four times faster than a torpedo.
It was not immediately known if the Iranian missile, which has not yet been named, was based on the Shkval, and whether it can carry a nuclear warhead.
"It has a very powerful warhead designed to hit big submarines. Even if enemy warship sensors identify the missile, no warship can escape from this missile because of its high speed," Fadavi told state-run television.
The missile test was conducted during the third day of large-scale military manoeuvres by tens of thousands of soldiers in the Persian Gulf and the Arabian Sea, part of Iran's "Holy Prophet" war games.
On Friday, Iran test-fired the Fajr-3 missile, which can avoid radars and hit several targets simultaneously using multiple warheads. The Revolutionary Guards said the test was successful.
The missile tests and war games coincide with increasing tension between Iran and the West over Tehran's nuclear programme.
The United States and its allies believe Iran is seeking to develop nuclear weapons, but Tehran denies that, saying its programme is for generating electricity.
The UN Security Council is demanding that Iran halt its uranium enrichment activities. But an Iranian envoy has said its activities are "not reversible".
Iran launched an arms development programme during its 1980-88 war with Iraq to compensate for a US weapons embargo.
Since 1992, Iran has produced its own tanks, armoured personnel carriers, missiles and a fighter plane.