HMS Argyll was moored at Devonport Naval base in Plymouth when the 9ft missile suddenly shot out of its starboard side during a training drill.
Workers watched in disbelief as the tube-shaped projectile flew through the air before blasting a hole in a security fence and slamming into a storage container.
The torpedo was an unarmed version used for testing drills so it merely thudded into the metal container and did not explode.
Nobody was hurt but shocked Navy bosses ordered an urgent investigation into the incident that took place inside a high security area where Britain's nuclear submarines are refuelled and repaired.