The new legislation affects 256 ships who regularly transit the Gulf of Aden, Indian Ocean and Red Sea, Asian reports said.
The oceans and fisheries ministry said the safe-room must be located in a secret space and constructed solidly enough to withstand gun attacks.
The targeted ships operated 518 times in dangerous waters last year.