According to the state media, there was no report of an oil spill.
The incident is said to have occurred around 7.20 am.
The tanker, which had an oil load capacity of 50,000 tonnes, was unloaded when the explosion occurred and smoke was detected, state-run Xinhua news agency reported.
The cause of the accident is under investigation, it said. State-run China Central Television said an open flame triggered the blast but did not provide further details.
Official sources in Beijing said the Indian consulate in Shanghai was waiting for more details from Chinese authorities.