“We advise citizens in Aqaba to stay indoors and close the windows,” Jamal Obeidat, head of the Aqaba Health Department, told state television.
Mr Obeidat said the situation was critical and there could be more deaths linked to the leak.
The explosion is one of Jordan's worst accidents in recent years. A flash flood near the Dead Sea in 2018 killed 21 people, most of them students on a school bus.
Amer Al Sartawi, spokesman for the General Security Directorate, said a tank "filled with a toxic gaseous substance fell during transport, which led to a gas leakage at the site".
Footage broadcast by state media shows a crane loading a large tank onto a vessel. The tank falls from a winch and crashes onto the deck of the ship before exploding in a plume of yellow smoke. Port workers can be seen trying to flee.
Officials said the cylinder contained 25 tonnes of chlorine destined for export.
Aqaba beaches were evacuated and shipping was halted, state television said.
Information Minister Faisal Al Shboul said the government had sent a field hospital and medical equipment to Aqaba. At least one plane arrived from Amman to evacuate the injured, state media said.
The area where the explosion occurred in the Bay of Aqaba is 20 kilometres from Israel's southern city of Eilat. Aqaba has a population of 188,000 people and 50,000 people live in Eilat, with the two cities connected by a land border.
Aqaba governor Mohammad Al Radayaa said the situation had been brought under control.
Jordan has been struggling economically and unemployment is at an official high of about 24 per cent. In the past three years, authorities opened Aqaba up to cheap flights from Europe to promote tourism.
In addition to the Red Sea, many tourists use Aqaba as a base to visit nearby the Nabataean city of Petra, which is two hours away.