Chemicals are carried in ships in two ways. Firstly, in specially designed and constructed chemical bulk carriers with chemical cargo tanks. Secondly, chemicals can be carried in a packaged form e.g. in drums and stowed in a container carried by a container ship.
When the cargo tanks in a chemical tanker are cleaned, no residues are allowed to be pumped overboard. Either through human error or the crew breaks the regulations, chemical residues have been pumped into the sea, but this is very rare.
Chemicals are very hazardous. Special regulations apply to how chemicals are carried on a ship. For example, some chemicals must not be loaded in the same shipping container as other chemicals, because, if they leak, they may either let off poisonous fumes or catch fire.